D11009: tests: demonstrate crash when common predecessor of divergence is hidden
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Jul 7 18:22:21 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11009
AFFECTED FILES
tests/test-amend.t
CHANGE DETAILS
diff --git a/tests/test-amend.t b/tests/test-amend.t
--- a/tests/test-amend.t
+++ b/tests/test-amend.t
@@ -250,6 +250,32 @@
[10]
$ hg amend -m divergent --config experimental.evolution.allowdivergence=true
2 new content-divergent changesets
+
+Hidden common predecessor of divergence does not cause crash
+
+First create C1 as a pruned successor of C
+ $ hg co C
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg amend -m C1
+ $ hg tag --local C1
+ $ hg debugobsolete $(hg log -T '{node}' -r C1)
+ 1 new obsolescence markers
+ obsoleted 1 changesets
+Now create C2 as other side of divergence (not actually divergent because C1 is
+pruned)
+ $ hg co C
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg amend -m C2
+ 1 new orphan changesets
+Make the common predecessor (C) pruned
+ $ hg tag --local --remove C
+ $ hg co C1
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+Try to cause divergence
+ $ hg amend -m C11
+ abort: filtered revision '26805aba1e600a82e93661149f2313866a221a7b' (known-bad-output !)
+ [255]
+ [10]
#endif
Cannot amend public changeset
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list