| 1 |
Failed qimport of patches from files should cleanup by recording successfully |
| 2 |
imported patches in series file. |
| 3 |
|
| 4 |
$ echo "[extensions]" >> $HGRCPATH |
| 5 |
$ echo "mq=" >> $HGRCPATH |
| 6 |
$ hg init repo |
| 7 |
$ cd repo |
| 8 |
$ echo a > a |
| 9 |
$ hg ci -Am'add a' |
| 10 |
adding a |
| 11 |
$ cat >b.patch<<EOF |
| 12 |
> diff --git a/a b/a |
| 13 |
> --- a/a |
| 14 |
> +++ b/a |
| 15 |
> @@ -1,1 +1,2 @@ |
| 16 |
> a |
| 17 |
> +b |
| 18 |
> EOF |
| 19 |
|
| 20 |
empty series |
| 21 |
|
| 22 |
$ hg qseries |
| 23 |
|
| 24 |
qimport valid patch followed by invalid patch |
| 25 |
|
| 26 |
$ hg qimport b.patch fakepatch |
| 27 |
adding b.patch to series file |
| 28 |
abort: unable to read file fakepatch |
| 29 |
[255] |
| 30 |
|
| 31 |
valid patches before fail added to series |
| 32 |
|
| 33 |
$ hg qseries |
| 34 |
b.patch |
| 35 |
|
| 36 |
$ hg pull -q -r 0 . # update phase |
| 37 |
$ hg qimport -r 0 |
| 38 |
abort: revision 0 is not mutable |
| 39 |
(see 'hg help phases' for details) |
| 40 |
[255] |
| 41 |
|
| 42 |
$ cd .. |