tests/test-mq-qimport-fail-cleanup
branchstable
changeset 11462 1b82a26635d7
equal deleted inserted replaced
11461:2b83c26b29f3 11462:1b82a26635d7
       
     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'
       
    13 
       
    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
       
    22 
       
    23 echo
       
    24 echo '#empty series'
       
    25 hg qseries
       
    26 
       
    27 echo
       
    28 echo '#qimport valid patch followed by invalid patch'
       
    29 hg qimport b.patch fakepatch
       
    30 
       
    31 echo
       
    32 echo '#valid patches before fail added to series'
       
    33 hg qseries