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: 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/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