Commits

Dan Villiom Podlaski Christiansen committed 97a064e

push: fix obsolete feature detection

The obsolete feature detection didn't work with demandimport, breaking
hgsubversion when running against 2.0-2.3.

Comments (0)

Files changed (2)

hgsubversion/wrappers.py

     ui = repo.ui
     old_encoding = util.swap_out_encoding()
 
-    hasobsolete = obsolete and obsolete._enabled
+    try:
+        hasobsolete = obsolete._enabled
+    except:
+        hasobsolete = False
 
     temporary_commits = []
     try:

tests/test_util.py

 
 try:
     from mercurial import obsolete
+    obsolete._enabled
 except ImportError:
     obsolete = None