tests/test-copy2
changeset 4744 44e17f5029d0
parent 4743 719c402258ee
child 8167 6c82beaaa11a
equal deleted inserted replaced
4743:719c402258ee 4744:44e17f5029d0
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 hg init
     3 hg init
     4 echo foo > foo
     4 echo foo > foo
       
     5 echo "# should fail - foo is not managed"
       
     6 hg mv foo bar
       
     7 hg st -A
     5 hg add foo
     8 hg add foo
       
     9 echo "# dry-run; print a warning that this is not a real copy; foo is added"
       
    10 hg mv --dry-run foo bar
       
    11 hg st -A
       
    12 echo "# should print a warning that this is not a real copy; bar is added"
       
    13 hg mv foo bar
       
    14 hg st -A
       
    15 echo "# should print a warning that this is not a real copy; foo is added"
       
    16 hg cp bar foo
       
    17 hg rm -f bar
       
    18 rm bar
       
    19 hg st -A
     6 hg commit -m1 -d"0 0"
    20 hg commit -m1 -d"0 0"
     7 
    21 
       
    22 echo "# dry-run; should show that foo is clean"
       
    23 hg copy --dry-run foo bar
       
    24 hg st -A
     8 echo "# should show copy"
    25 echo "# should show copy"
     9 hg copy foo bar
    26 hg copy foo bar
    10 hg st -C
    27 hg st -C
    11 
    28 
    12 echo "# shouldn't show copy"
    29 echo "# shouldn't show copy"