Mercurial > public > mercurial-scm > hg-stable
diff tests/test-histedit-edit.t @ 24111:11d72683f3de
histedit: don't allow to strip nodes which are necessary to continue histedit
During histedit we don't want user to do any operation resulting in
stripping nodes needed to continue history editing. This patch
wraps the strip function to detect such situations.
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Fri, 30 Jan 2015 16:47:35 -0800 |
parents | aa4a1672583e |
children | be7cb25186be |
line wrap: on
line diff
--- a/tests/test-histedit-edit.t Fri Feb 06 16:09:43 2015 -0800 +++ b/tests/test-histedit-edit.t Fri Jan 30 16:47:35 2015 -0800 @@ -3,6 +3,7 @@ $ cat >> $HGRCPATH <<EOF > [extensions] > histedit= + > strip= > EOF $ initrepo () @@ -72,6 +73,11 @@ (use 'hg histedit --continue' or 'hg histedit --abort') [255] +Try to delete necessary commit + $ hg strip -r 652413bf663e + abort: unable to strip 652413bf663ef2a641cab26574e46d5f5a64a55a. Nodes are used by history edit in progress. + [255] + commit, then edit the revision $ hg ci -m 'wat' created new head