changeset 34492:a5a810df4c81

configitems: register the 'experimental.rebaseskipobsolete' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:42:06 +0200
parents eb1517776f8a
children c4a2db2cc0fb
files hgext/rebase.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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,