tests/test-add
changeset 11795 06793ad30575
parent 11794 80c63b2a29a8
child 11796 141e2e964705
equal deleted inserted replaced
11794:80c63b2a29a8 11795:06793ad30575
     1 #!/bin/sh
       
     2 
       
     3 hg init a
       
     4 cd a
       
     5 echo a > a
       
     6 hg add -n
       
     7 hg st
       
     8 hg add
       
     9 hg st
       
    10 hg forget a
       
    11 hg add
       
    12 hg st
       
    13 
       
    14 echo b > b
       
    15 hg add -n b
       
    16 hg st
       
    17 hg add b || echo "failed to add b"
       
    18 hg st
       
    19 echo % should fail
       
    20 hg add b
       
    21 hg st
       
    22 
       
    23 hg ci -m 0 --traceback
       
    24 echo % should fail
       
    25 hg add a
       
    26 
       
    27 echo aa > a
       
    28 hg ci -m 1
       
    29 hg up 0
       
    30 echo aaa > a
       
    31 hg ci -m 2
       
    32 
       
    33 hg merge
       
    34 hg st
       
    35 echo % should fail
       
    36 hg add a
       
    37 hg st
       
    38 hg resolve -m a
       
    39 hg ci -m merge
       
    40 
       
    41 echo % issue683
       
    42 hg forget a
       
    43 hg add a
       
    44 hg st
       
    45 hg rm a
       
    46 hg st
       
    47 echo a > a
       
    48 hg add a
       
    49 hg st
       
    50 
       
    51 hg add c && echo "unexpected addition of missing file"
       
    52 echo c > c
       
    53 hg add d c && echo "unexpected addition of missing file"
       
    54 hg st
       
    55