##// END OF EJS Templates
rebase: exclude descendants of obsoletes w/o a successor in dest (issue5300)...
rebase: exclude descendants of obsoletes w/o a successor in dest (issue5300) .. feature:: Let 'hg rebase' avoid content-divergence by skipping obsolete changesets (and their descendants) when they are present in the rebase set along with one of their successors but none of their successors is in destination. In the following example, when trying to rebase 3:: onto 2, the rebase will abort with "this rebase will cause divergence from: 4": o 7 f | | o 6 e | | | o 5 d' | | x | 4 d (rewritten as 5) |/ o 3 c | | o 2 x | | o | 1 b |/ o 0 a By excluding obsolete changesets without a successor in destination (4 in the example above) and their descendants, we make rebase work in this case, thus giving: o 11 e | o 10 d' | o 9 c | o 8 b | | o 7 f | | | | x 6 e (rewritten using rebase as 11) | | | | | x 5 d' (rewritten using rebase as 10) | | | | x | 4 d | |/ | x 3 c (rewritten using rebase as 9) | | o | 2 x | | | x 1 b (rewritten using rebase as 8) |/ o 0 a where branch 4:: is left behind while branch 5:: is rebased as expected. The rationale is that users may not be interested in rebasing orphan changesets when specifying a rebase set that include them but would still want "stable" ones to be rebased. Currently, the user is suggested to allow divergence (but probably does not want it) or they must specify a rebase set excluding problematic changesets (which might be a bit cumbersome). The approach proposed here corresponds to "Option 2" in https://www.mercurial-scm.org/wiki/CEDRebase. We extend _computeobsoletenotrebased() so that it also return a set of obsolete changesets in rebase set without a successor in destination but with at least one successor in rebase set. This 'obsoletewithoutsuccessorindestination' is then stored as an attribute of rebaseruntime and used in _performrebasesubset() to: * filter out descendants of these changesets from the revisions to rebase; * issue a message about these revisions being skipped. This only occurs if 'evolution.allowdivergence' option is off and 'rebaseskipobsolete' is on.
Denis Laxalde -
r35049:a68c3420 default
Show More
Name Size Modified Last Commit Author
contrib
doc
hgdemandimport
hgext
hgext3rd
i18n
mercurial
tests
.arcconfig Loading ...
.clang-format Loading ...
.editorconfig Loading ...
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
CONTRIBUTING Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README.rst Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
setup.py Loading ...

Mercurial

Mercurial is a fast, easy to use, distributed revision control tool for software developers.

Basic install:

$ make            # see install targets
$ make install    # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg              # see help

Running without installing:

$ make local      # build for inplace usage
$ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation instructions, platform-specific notes, and Mercurial user information.