# HG changeset patch # User Pulkit Goyal # Date 1540383669 -10800 # Node ID 2b342625a92ab78cf0a89d04bdfbcbb5b9dc5183 # Parent f778fdd82c8354bb37c7712eaed0d6c15279e706 test: add compat code for removed revlog.LookupError in test_push_command.py revlog.LookupError was removed recently. If that's not present, we will use error.LookupEror instead. revlog.LookupError was split into three different errors which subclasses error.LookupError, so catching error.LookupError is fine. diff --git a/tests/test_push_command.py b/tests/test_push_command.py --- a/tests/test_push_command.py +++ b/tests/test_push_command.py @@ -25,6 +25,10 @@ import time revsymbol = test_util.revsymbol +try: + lookuperror = revlog.LookupError +except AttributeError: + lookuperror = hgerror.LookupError class PushTests(test_util.TestBase): obsolete_mode_tests = True @@ -350,7 +354,7 @@ class PushTests(test_util.TestBase): try: self.assertEqual(tip.parents()[0]['adding_file2'].data(), 'foo') assert False, "this is impossible, adding_file2 should not be in this manifest." - except revlog.LookupError, e: + except lookuperror, e: pass self.assertEqual(tip.branch(), 'default')