Previously rebase source and destination could not overlap. But with the
multi-destination support, source and destination could reasonably partially
overlap. That requires another topological sort on {sourcerev: destrev}
graph (destmap). This patch implements that.
If a revision's destination is itself, the error message gets changed from
"source is ancestor of destination" to "source and destination form a
cycle". Not marking as BC since automation should depend on exit code, not
error message.
The multi-destination feature seems quite usable now so its documentation
was formally added.
.. feature:: Rebase with multi-destinations (experimental)
Previously, rebase only supports one unique destination. Now ``SRC`` and ``ALLSRC`` can be used in rebase destination revset to precisely define destination per each individual source revision. For example, the following command could move some orphaned changesets to reasonable new places so they become no longer orphaned:: hg rebase -r 'orphan()-obsolete()' -d 'max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::)' This feature is disabled by default. To enable it, set ``experimental.rebase.multidest`` to ``true``.
Good catch! It was an unmatched backtick.