changeset 1216:a307eea46f96

oldobsolete: remove use of obsolete._enabled obsolete._enabled is deprecated. Switch to the newer obsolete.isenabled() logic.
author Durham Goode <durham@fb.com>
date Thu, 19 Mar 2015 13:42:27 -0700
parents 004e21b8d67b
children 196c650d5ba9
files hgext/obsolete.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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