[Bug 6927] New: Undo/amend obsolete
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Wed Oct 9 18:27:32 UTC 2024
https://bz.mercurial-scm.org/show_bug.cgi?id=6927
Bug ID: 6927
Summary: Undo/amend obsolete
Product: Mercurial
Version: 6.7.4
Hardware: PC
OS: NetBSD
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: evolution
Assignee: bugzilla at mercurial-scm.org
Reporter: mercurial-bugzilla at campbell.mumble.net
CC: mercurial-devel at mercurial-scm.org,
pierre-yves.david at ens-lyon.org
Python Version: ---
I made a series of two commits:
A--->B
These were later redone as three commits:
A1--->B1--->A2
I ran `hg obsolete -s A1 -r A' and then `hg obsolete -s B1 -r B', before I
realized that A had really been split into two successors, A1 and A2.
I tried running `hg obsolete --split -s A1 -s A2 -r A', which failed because A
is already hidden:
$ hg obsolete --split -s 1185688:7c1d5ce2b966 -s 1185710:ac2f6f6171af -r
1185680:70bb5ff5c91e
abort: hidden revision '1185680' was rewritten as: 7c1d5ce2b966
(use --hidden to access hidden revisions)
I added `--hidden', but it failed because of content-divergence:
$ hg obsolete --hidden --split -s 1185688:7c1d5ce2b966 -s 1185710:ac2f6f6171af
-r 1185680:70bb5ff5c91e
abort: cannot prune 70bb5ff5c91e, as that creates content-divergence with
7c1d5ce2b966
(add --verbose for details or see 'hg help evolution.instability')
$ hg obsolete --verbose --hidden --split -s 1185688:7c1d5ce2b966 -s
1185710:ac2f6f6171af -r 1185680:70bb5ff5c91e
abort: cannot prune 70bb5ff5c91e, as that creates content-divergence with
7c1d5ce2b966
changeset 70bb5ff5c91e already has a successor in changeset 7c1d5ce2b966
rewriting changeset 70bb5ff5c91e would create "content-divergence"
set experimental.evolution.allowdivergence=True to skip this check
(see 'hg help evolution.instability' for details on content-divergence)
I thought OK, maybe I can just record the whole set A1/B1/A2 as a successor for
the whole set A/B using `--pair' instead of `--split', but no:
$ hg obsolete --verbose --hidden --pair -s 1185688:7c1d5ce2b966 -s
1185689:6fbd1b682dd3 -s 1185690:1fa0e63c4e5d -s 1185710:ac2f6f6171af -r
1185680:70bb5ff5c91e -r 1185681:2aadd0402400
abort: cannot prune 70bb5ff5c91e, as that creates content-divergence with
7c1d5ce2b966
changeset 70bb5ff5c91e already has a successor in changeset 7c1d5ce2b966
rewriting changeset 70bb5ff5c91e would create "content-divergence"
set experimental.evolution.allowdivergence=True to skip this check
(see 'hg help evolution.instability' for details on content-divergence)
1. How do I undo or correct a successor relation that I entered wrongly by
mistake, before it has propagated to any other repositories?
2. How do I express the successor relation in this case? Is the `--pair'
approach the right way, assuming I can undo/correct the existing successor
relation?
3. Suppose someone else had created the wrong successor relation in their
repository, and I pulled from it. Is there any way to undo it in that case?
Is there any way to detect what relations I will get, or got, by pulling, and
review them?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list