##// END OF EJS Templates
tests: unify test-mq-qimport-fail-cleanup
Matt Mackall -
r12465:8b12768b default
parent child Browse files
Show More
@@ -1,33 +1,40 b''
1 #!/bin/sh
2 #failed qimport of patches from files should cleanup by recording successfully
3 #imported patches in series file.
4
5 echo "[extensions]" >> $HGRCPATH
6 echo "mq=" >> $HGRCPATH
7
8 hg init repo
9 cd repo
10
11 echo a > a
12 hg ci -Am'add a'
1 Failed qimport of patches from files should cleanup by recording successfully
2 imported patches in series file.
13 3
14 cat >b.patch<<EOF
15 diff --git a/a b/a
16 --- a/a
17 +++ b/a
18 @@ -1,1 +1,2 @@
19 a
20 +b
21 EOF
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 $ echo
20
22 21
23 echo
24 echo '#empty series'
25 hg qseries
22 empty series
23
24 $ hg qseries
25 $ echo
26
27
28 qimport valid patch followed by invalid patch
26 29
27 echo
28 echo '#qimport valid patch followed by invalid patch'
29 hg qimport b.patch fakepatch
30 $ hg qimport b.patch fakepatch
31 adding b.patch to series file
32 abort: unable to read file fakepatch
33 [255]
34 $ echo
35
30 36
31 echo
32 echo '#valid patches before fail added to series'
33 hg qseries
37 valid patches before fail added to series
38
39 $ hg qseries
40 b.patch
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now