configitems: register the 'experimental.rebaseskipobsolete' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 30 Jun 2017 03:42:06 +0200
changeset 34492 a5a810df4c81
parent 34491 eb1517776f8a
child 34493 c4a2db2cc0fb
configitems: register the 'experimental.rebaseskipobsolete' config
hgext/rebase.py
--- a/hgext/rebase.py	Fri Jun 30 03:41:49 2017 +0200
+++ b/hgext/rebase.py	Fri Jun 30 03:42:06 2017 +0200
@@ -73,6 +73,13 @@
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+configitem('experimental', 'rebaseskipobsolete',
+    default=True,
+)
+
 def _nothingtorebase():
     return 1
 
@@ -307,8 +314,7 @@
         destmap:        {srcrev: destrev} destination revisions
         """
         self.obsoletenotrebased = {}
-        if not self.ui.configbool('experimental', 'rebaseskipobsolete',
-                                  default=True):
+        if not self.ui.configbool('experimental', 'rebaseskipobsolete'):
             return
         obsoleteset = set(obsoleterevs)
         self.obsoletenotrebased = _computeobsoletenotrebased(self.repo,