Patchwork D1063: rebase: enable multidest by default

login
register
mail settings
Submitter phabricator
Date Dec. 7, 2017, 7:56 p.m.
Message ID <973c9001d8e612acdbecc32c2c93ed34@localhost.localdomain>
Download mbox | patch
Permalink /patch/26008/
State Not Applicable
Headers show

Comments

phabricator - Dec. 7, 2017, 7:56 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd2055c13f1f4: rebase: enable multidest by default (authored by quark, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D1063?vs=2702&id=4174#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1063?vs=2702&id=4174

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

AFFECTED FILES
  hgext/rebase.py
  mercurial/configitems.py
  tests/test-rebase-dest.t

CHANGE DETAILS




To: quark, #hg-reviewers, durin42, dlax
Cc: krbullock, dlax, martinvonz, durin42, mercurial-devel

Patch

diff --git a/tests/test-rebase-dest.t b/tests/test-rebase-dest.t
--- a/tests/test-rebase-dest.t
+++ b/tests/test-rebase-dest.t
@@ -115,7 +115,6 @@ 
   > [extensions]
   > maprevset=$TESTTMP/maprevset.py
   > [experimental]
-  > rebase.multidest=true
   > evolution=true
   > EOF
 
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -532,11 +532,11 @@ 
 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
     default=False,
 )
-coreconfigitem('experimental', 'rebase.multidest',
+coreconfigitem('experimental', 'remotenames',
     default=False,
 )
-coreconfigitem('experimental', 'remotenames',
-    default=False,
+coreconfigitem('experimental', 'revertalternateinteractivemode',
+    default=True,
 )
 coreconfigitem('experimental', 'revlogv2',
     default=None,
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -643,6 +643,11 @@ 
       4. If you do not specify any of ``--rev``, ``source``, or ``--base``,
          rebase will use ``--base .`` as above.
 
+    If ``--source`` or ``--rev`` is used, special names ``SRC`` and ``ALLSRC``
+    can be used in ``--dest``. Destination would be calculated per source
+    revision with ``SRC`` substituted by that single source revision and
+    ``ALLSRC`` substituted by all source revisions.
+
     Rebase will destroy original changesets unless you use ``--keep``.
     It will also move your bookmarks (even if you do).
 
@@ -691,6 +696,12 @@ 
 
           hg rebase -r "branch(featureX)" -d 1.3 --keepbranches
 
+      - stabilize orphaned changesets so history looks linear::
+
+          hg rebase -r 'orphan()-obsolete()'\
+ -d 'first(max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::) +\
+ max(::((roots(ALLSRC) & ::SRC)^)-obsolete()))'
+
     Configuration Options:
 
     You can make rebase require a destination if you set the following config
@@ -884,8 +895,6 @@ 
             # fast path: try to resolve dest without SRC alias
             dest = scmutil.revsingle(repo, destf, localalias=alias)
         except error.RepoLookupError:
-            if not ui.configbool('experimental', 'rebase.multidest'):
-                raise
             # multi-dest path: resolve dest for each SRC separately
             destmap = {}
             for r in rebaseset: