Changeset - 62469662c660
[Not reviewed]
default
0 2 0
Mads Kiilerich (mads) - 6 years ago 2020-07-20 20:13:32
mads@kiilerich.com
mercurial: support Mercurial 5.5

No release notes yet, but testing shows it working with a few changes.

A few tests need updating because error messages from remote ssh like our
sys.stderr.write('abort: %s\n' % error)
like for
remote: abort: Access to %r denied
will now appear on stderr instead of stdout - a very reasonable bug fix.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -308,7 +308,7 @@ class TestVCSOperations(base.TestControl
 
        if vt.repo_type == 'git':
 
            assert 'not found' in stderr or 'abort: Access to %r denied' % 'trololo' in stderr
 
        elif vt.repo_type == 'hg':
 
            assert 'HTTP Error 404: Not Found' in stderr or 'abort: no suitable response from remote hg' in stderr and 'remote: abort: Access to %r denied' % 'trololo' in stdout
 
            assert 'HTTP Error 404: Not Found' in stderr or 'abort: no suitable response from remote hg' in stderr and 'remote: abort: Access to %r denied' % 'trololo' in stdout + stderr
 

	
 
    @parametrize_vcs_test
 
    def test_push_new_repo(self, webserver, vt):
 
@@ -429,7 +429,7 @@ class TestVCSOperations(base.TestControl
 
            if vt.repo_type == 'git':
 
                assert "abort: Access to './%s' denied" % vt.repo_name in stderr
 
            else:
 
                assert "abort: Access to './%s' denied" % vt.repo_name in stdout
 
                assert "abort: Access to './%s' denied" % vt.repo_name in stdout + stderr
 

	
 
        stdout, stderr = Command(dest_dir).execute(vt.repo_type, 'pull', clone_url.replace('/' + vt.repo_name, '/%s/' % vt.repo_name), ignoreReturnCode=True)
 
        if vt.repo_type == 'git':
 
@@ -525,7 +525,7 @@ class TestVCSOperations(base.TestControl
 
                # The message apparently changed in Git 1.8.3, so match it loosely.
 
                assert re.search(r'\b403\b', stderr) or 'abort: User test_admin from 127.0.0.127 cannot be authorized' in stderr
 
            elif vt.repo_type == 'hg':
 
                assert 'abort: HTTP Error 403: Forbidden' in stderr or 'remote: abort: User test_admin from 127.0.0.127 cannot be authorized' in stdout
 
                assert 'abort: HTTP Error 403: Forbidden' in stderr or 'remote: abort: User test_admin from 127.0.0.127 cannot be authorized' in stdout + stderr
 
        finally:
 
            # release IP restrictions
 
            for ip in UserIpMap.query():
setup.py
Show inline comments
 
@@ -63,7 +63,7 @@ requirements = [
 
    "URLObject >= 2.3.4, < 2.5",
 
    "Routes >= 2.0, < 2.5",
 
    "dulwich >= 0.19.0, < 0.20",
 
    "mercurial >= 5.2, < 5.5",
 
    "mercurial >= 5.2, < 5.6",
 
    "decorator >= 4.2.1, < 4.5",
 
    "Paste >= 2.0.3, < 3.5",
 
    "bleach >= 3.0, < 3.1.4",
0 comments (0 inline, 0 general)