# HG changeset patch # User Mads Kiilerich # Date 2020-07-20 20:13:32 # Node ID 62469662c6601ad608dabc037d4df7211c69a494 # Parent 68eee0e7f4f535eaf06c84bac3a04512e3441e14 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. diff --git a/kallithea/tests/other/test_vcs_operations.py b/kallithea/tests/other/test_vcs_operations.py --- a/kallithea/tests/other/test_vcs_operations.py +++ b/kallithea/tests/other/test_vcs_operations.py @@ -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(): diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -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",