Patchwork [03,of,14] configitems: register the 'experimental.rebaseskipobsolete' config

login
register
mail settings
Submitter Boris Feld
Date Oct. 6, 2017, 9:22 a.m.
Message ID <a5a810df4c815ba7f1e4.1507281739@FB>
Download mbox | patch
Permalink /patch/24592/
State Accepted
Headers show

Comments

Boris Feld - Oct. 6, 2017, 9:22 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498786926 -7200
#      Fri Jun 30 03:42:06 2017 +0200
# Node ID a5a810df4c815ba7f1e4f820504459a52ec39b2a
# Parent  eb1517776f8a5a98788389700c003689c03ed19c
# EXP-Topic config.register.rebase
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r a5a810df4c81
configitems: register the 'experimental.rebaseskipobsolete' config

Patch

diff -r eb1517776f8a -r a5a810df4c81 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,