Mercurial > hg
diff tests/test-histedit-fold.t @ 33762:c26a76e1af36
histedit: check first changeset for verb "roll" or "fold" (issue5498)
If someone changes "pick" to "roll" or "fold" for the first
changeset in a histedit rule Mercurial could remove a wrong
changeset if the phase is non-public.
roll or fold for the first changeset should be invalid.
author | André Klitzing <aklitzing@gmail.com> |
---|---|
date | Fri, 11 Aug 2017 15:20:41 +0200 |
parents | 154298576d44 |
children | 96f43981c1c4 |
line wrap: on
line diff
--- a/tests/test-histedit-fold.t Mon Jul 31 23:13:47 2017 +0900 +++ b/tests/test-histedit-fold.t Fri Aug 11 15:20:41 2017 +0200 @@ -541,3 +541,36 @@ END $ cd .. + +Test rolling into a commit with multiple children (issue5498) + + $ hg init roll + $ cd roll + $ echo a > a + $ hg commit -qAm aa + $ echo b > b + $ hg commit -qAm bb + $ hg up -q ".^" + $ echo c > c + $ hg commit -qAm cc + $ hg log -G -T '{node|short} {desc}' + @ 5db65b93a12b cc + | + | o 301d76bdc3ae bb + |/ + o 8f0162e483d0 aa + + + $ hg histedit . --commands - << EOF + > r 5db65b93a12b + > EOF + hg: parse error: first changeset cannot use verb "roll" + [255] + $ hg log -G -T '{node|short} {desc}' + @ 5db65b93a12b cc + | + | o 301d76bdc3ae bb + |/ + o 8f0162e483d0 aa + +