tests/test-issue322
branchstable
changeset 12795 3cb0559e44d0
parent 12793 469850088fc1
parent 12794 6bf8d48bec8e
child 12796 bc69ba99e34b
equal deleted inserted replaced
12793:469850088fc1 12795:3cb0559e44d0
     1 #!/bin/sh
       
     2 # http://mercurial.selenic.com/bts/issue322
       
     3 
       
     4 echo % file replaced with directory
       
     5 
       
     6 hg init a
       
     7 cd a
       
     8 echo a > a
       
     9 hg commit -Ama
       
    10 rm a
       
    11 mkdir a
       
    12 echo a > a/a
       
    13 
       
    14 echo % should fail - would corrupt dirstate
       
    15 hg add a/a
       
    16 
       
    17 cd ..
       
    18 
       
    19 echo % directory replaced with file
       
    20 
       
    21 hg init c
       
    22 cd c
       
    23 mkdir a
       
    24 echo a > a/a
       
    25 hg commit -Ama
       
    26 
       
    27 rm -r a
       
    28 echo a > a
       
    29 
       
    30 echo % should fail - would corrupt dirstate
       
    31 hg add a
       
    32 
       
    33 cd ..
       
    34 
       
    35 echo % directory replaced with file
       
    36 
       
    37 hg init d
       
    38 cd d
       
    39 mkdir b
       
    40 mkdir b/c
       
    41 echo a > b/c/d
       
    42 hg commit -Ama
       
    43 rm -r b
       
    44 echo a > b
       
    45 
       
    46 echo % should fail - would corrupt dirstate
       
    47 hg add b
       
    48 
       
    49 exit 0