Skip to content
Snippets Groups Projects
Commit 10a0ae66 authored by durin42's avatar durin42
Browse files

histedit: refuse to edit history that contains merges (issue3962)

parent 32e502b2
Branches
Tags
No related merge requests found
......@@ -679,6 +679,8 @@
if (not obsolete._enabled and
repo.revs('(%ld::) - (%ld)', ctxs, ctxs)):
raise util.Abort(_('cannot edit history that would orphan nodes'))
if repo.revs('(%ld) and merge()', ctxs):
raise util.Abort(_('cannot edit history that contains merges'))
root = ctxs[0] # list is already sorted by repo.set
if not root.phase():
raise util.Abort(_('cannot edit immutable changeset: %s') % root)
......
......@@ -441,4 +441,19 @@
|
o 0:cb9a9f314b8b (public) a
$ hg co 18
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo wat >> wat
$ hg add wat
$ hg ci -m 'add wat'
created new head
$ hg merge 19
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m 'merge'
$ echo not wat > wat
$ hg ci -m 'modify wat'
$ hg histedit 17
abort: cannot edit history that contains merges
[255]
$ cd ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment