Patchwork D1155: config: gather allowdivergence under the evolution namespace

login
register
mail settings
Submitter phabricator
Date Oct. 18, 2017, 4:10 p.m.
Message ID <407949265d53e7b55c6fc453b518da5e@localhost.localdomain>
Download mbox | patch
Permalink /patch/25183/
State Not Applicable
Headers show

Comments

phabricator - Oct. 18, 2017, 4:10 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG29f52e7966dd: config: gather allowdivergence under the evolution namespace (authored by lothiraldan, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1155?vs=2928&id=2989

REVISION DETAIL
  https://phab.mercurial-scm.org/D1155

AFFECTED FILES
  hgext/rebase.py
  mercurial/configitems.py
  mercurial/help/config.txt
  tests/test-rebase-obsolete.t

CHANGE DETAILS




To: lothiraldan, #hg-reviewers, indygreg
Cc: indygreg, quark, ryanmce, mercurial-devel

Patch

diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t
+++ b/tests/test-rebase-obsolete.t
@@ -826,7 +826,7 @@ 
   orphan: 1 changesets
   $ hg rebase -s 10 -d 12
   abort: this rebase will cause divergences from: 121d9e3bc4c6
-  (to force the rebase please set experimental.allowdivergence=True)
+  (to force the rebase please set experimental.evolution.allowdivergence=True)
   [255]
   $ hg log -G
   @  14:73568ab6879d bar foo
@@ -845,9 +845,9 @@ 
   |
   o  0:4a2df7238c3b A
   
-With experimental.allowdivergence=True, rebase can create divergence
+With experimental.evolution.allowdivergence=True, rebase can create divergence
 
-  $ hg rebase -s 10 -d 12 --config experimental.allowdivergence=True
+  $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True
   rebasing 10:121d9e3bc4c6 "P"
   rebasing 14:73568ab6879d "bar foo" (tip)
   $ hg summary
diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -1707,7 +1707,7 @@ 
 ``rebase``
 ----------
 
-``allowdivergence``
+``evolution.allowdivergence``
     Default to False, when True allow creating divergence when performing
     rebase of obsolete changesets.
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -300,9 +300,6 @@ 
 coreconfigitem('email', 'reply-to',
     default=None,
 )
-coreconfigitem('experimental', 'allowdivergence',
-    default=False,
-)
 coreconfigitem('experimental', 'archivemetatemplate',
     default=dynamicdefault,
 )
@@ -348,6 +345,10 @@ 
 coreconfigitem('experimental', 'evolution',
     default=list,
 )
+coreconfigitem('experimental', 'evolution.allowdivergence',
+    default=False,
+    alias=[('experimental', 'allowdivergence')]
+)
 coreconfigitem('experimental', 'evolution.allowunstable',
     default=None,
 )
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1061,16 +1061,16 @@ 
     """
     # Obsolete node with successors not in dest leads to divergence
     divergenceok = ui.configbool('experimental',
-                                 'allowdivergence')
+                                 'evolution.allowdivergence')
     divergencebasecandidates = rebaseobsrevs - rebaseobsskipped
 
     if divergencebasecandidates and not divergenceok:
         divhashes = (str(repo[r])
                      for r in divergencebasecandidates)
         msg = _("this rebase will cause "
                 "divergences from: %s")
         h = _("to force the rebase please set "
-              "experimental.allowdivergence=True")
+              "experimental.evolution.allowdivergence=True")
         raise error.Abort(msg % (",".join(divhashes),), hint=h)
 
 def successorrevs(unfi, rev):