##// END OF EJS Templates
histedit: allow operation from non-head if obsolete is enabled...
Pierre-Yves David -
r18165:0f5a0a20 default
parent child Browse files
Show More
@@ -593,7 +593,8 b' def between(repo, old, new, keep):'
593 When keep is false, the specified set can't have children."""
593 When keep is false, the specified set can't have children."""
594 ctxs = list(repo.set('%n::%n', old, new))
594 ctxs = list(repo.set('%n::%n', old, new))
595 if ctxs and not keep:
595 if ctxs and not keep:
596 if repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs):
596 if (not obsolete._enabled and
597 repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs)):
597 raise util.Abort(_('cannot edit history that would orphan nodes'))
598 raise util.Abort(_('cannot edit history that would orphan nodes'))
598 root = ctxs[0] # list is already sorted by repo.set
599 root = ctxs[0] # list is already sorted by repo.set
599 if not root.phase():
600 if not root.phase():
@@ -141,3 +141,15 b' Check that histedit respect phases'
141 $ hg histedit -r '.~2'
141 $ hg histedit -r '.~2'
142 abort: cannot edit immutable changeset: cb9a9f314b8b
142 abort: cannot edit immutable changeset: cb9a9f314b8b
143 [255]
143 [255]
144
145
146 +Test ui.prevent-unstable option
147 +------------------------------------
148
149 $ hg up '.^'
150 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
151 $ hg phase --force --draft .
152 $ hg log -r 'children(.)'
153 9:7c044e3e33a9 f (no-eol)
154 $ hg histedit -r '.'
155 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now