Mercurial > hg
view .hgignore @ 46834:535de0e34a79
rebase: filter out descendants of divergence-causing commits earlier
`hg rebase` treats obsolete commits differently depending what has
happened to the commit:
1) Obsolete commit without non-obsolete successors: Skipped, and a
note is printed ("it has no successor").
2) Obsolete commit with a successor in the destination (ancestor of
it): Skipped, and a note is printed ("already in destination").
3) Obsolete commit with a successor in the rebase set: The commit and
its descendants are skipped, and a note is printed ("not rebasing
<commit> and its descendants as this would cause divergence"), unless
`allowdivergence` config set.
4) Obsolete commit with a successor elsewhere: Error ("this rebase
will cause divergences"), unless `allowdivergence` config set.
Before this patch, we did all those checks up front, except for (3),
which was checked later. The later check consisted of two parts: 1)
filtering out of descendants, and 2) conditionally printing message if
the `allowdivergence` config was not set. This patch makes it so we do
the filtering early.
A consequence of filtering out divergence-causing commits earlier is
that we rebase commits in slightly different order, which has some
impact on tests.
Differential Revision: https://phab.mercurial-scm.org/D10249
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 19 Mar 2021 22:52:59 -0700 |
parents | 3e23794b9e1c |
children | e8138eba17ee |
line wrap: on
line source
syntax: glob *.elc *.tmp *.orig *.rej *~ *.mergebackup *.o *.so *.dll *.exe *.pyd *.pyc *.pyo *$py.class *.swp *.prof *.zip \#*\# .\#* tests/artifacts/cache/big-file-churn.hg tests/.coverage* tests/.testtimes* tests/.hypothesis tests/hypothesis-generated tests/annotated tests/exceptions tests/python3 tests/*.err tests/htmlcov build contrib/chg/chg contrib/hgsh/hgsh contrib/vagrant/.vagrant dist packages doc/common.txt doc/*.[0-9] doc/*.[0-9].txt doc/*.[0-9].gendoc.txt doc/*.[0-9].{x,ht}ml MANIFEST MANIFEST.in patches mercurial/__modulepolicy__.py mercurial/__version__.py mercurial/hgpythonlib.h mercurial.egg-info .DS_Store tags cscope.* .vscode/* .idea/* .asv/* .pytype/* .mypy_cache i18n/hg.pot locale/*/LC_MESSAGES/hg.mo hgext/__index__.py rust/target/ rust/*/target/ # Generated wheels wheelhouse/ syntax: rootglob # See Profiling in rust/README.rst .cargo/config syntax: regexp ^\.pc/ ^\.(pydev)?project # hackable windows distribution additions ^hg-python ^hg.py$