oldobsolete: remove use of obsolete._enabled
obsolete._enabled is deprecated. Switch to the newer obsolete.isenabled() logic.
--- a/hgext/obsolete.py Thu Mar 19 13:41:58 2015 -0700
+++ b/hgext/obsolete.py Thu Mar 19 13:42:27 2015 -0700
@@ -14,8 +14,6 @@
try:
from mercurial import obsolete
- if not obsolete._enabled:
- obsolete._enabled = True
except ImportError:
raise util.Abort('Obsolete extension requires Mercurial 2.3 (or later)')
@@ -40,6 +38,10 @@
"""
if not repo.local():
return
+ evolveopts = ui.configlist('experimental', 'evolution')
+ if not evolveopts:
+ evolveopts = 'all'
+ ui.setconfig('experimental', 'evolution', evolveopts)
for arg in sys.argv:
if 'debugc' in arg:
break