# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1398174791 -7200 # Node ID 97a064e2075ddb7b6df9b29431e1bc894abc34e2 # Parent d6296f901fc71f32e30754336aae18b2cc6fac6b push: fix obsolete feature detection The obsolete feature detection didn't work with demandimport, breaking hgsubversion when running against 2.0-2.3. diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -191,7 +191,10 @@ def push(repo, dest, force, revs): ui = repo.ui old_encoding = util.swap_out_encoding() - hasobsolete = obsolete and obsolete._enabled + try: + hasobsolete = obsolete._enabled + except: + hasobsolete = False temporary_commits = [] try: diff --git a/tests/test_util.py b/tests/test_util.py --- a/tests/test_util.py +++ b/tests/test_util.py @@ -29,6 +29,7 @@ from mercurial import extensions try: from mercurial import obsolete + obsolete._enabled except ImportError: obsolete = None