tests/test-commit
changeset 3786 8d603f8567ae
parent 3709 38291d9c8c1c
child 4253 9e3e975258a9
equal deleted inserted replaced
3785:6398ff7cb705 3786:8d603f8567ae
     1 #!/bin/sh
     1 #!/bin/sh
       
     2 
       
     3 cleanpath()
       
     4 {
       
     5     sed -e "s:/.*\(/test/.*\):...\1:"
       
     6 }
     2 
     7 
     3 echo % commit date test
     8 echo % commit date test
     4 hg init test
     9 hg init test
     5 cd test
    10 cd test
     6 echo foo > foo
    11 echo foo > foo
    15 
    20 
    16 echo % partial commit test
    21 echo % partial commit test
    17 echo bar > bar
    22 echo bar > bar
    18 hg add bar
    23 hg add bar
    19 rm bar
    24 rm bar
    20 hg commit -d "1000000 0" -m commit-8 2>&1 | sed -e "s:/.*\(/test/.*\):...\1:"
    25 hg commit -d "1000000 0" -m commit-8 2>&1 | cleanpath
       
    26 
       
    27 hg -q revert -a --no-backup
       
    28 
       
    29 mkdir dir
       
    30 echo boo > dir/file
       
    31 hg add
       
    32 hg -v commit -d '0 0' -m commit-9 dir
       
    33 
       
    34 echo > dir.file
       
    35 hg add
       
    36 hg commit -d '0 0' -m commit-10 dir dir.file 2>&1 | cleanpath
       
    37 
       
    38 echo >> dir/file
       
    39 mkdir bleh
       
    40 mkdir dir2
       
    41 cd bleh
       
    42 hg commit -d '0 0' -m commit-11 . 2>&1 | cleanpath
       
    43 hg commit -d '0 0' -m commit-12 ../dir ../dir2 2>&1 | cleanpath
       
    44 hg -v commit -d '0 0' -m commit-13 ../dir
       
    45 cd ..
       
    46 
       
    47 hg commit -d '0 0' -m commit-14 does-not-exist 2>&1 | cleanpath
       
    48 ln -s foo baz
       
    49 hg commit -d '0 0' -m commit-15 baz 2>&1 | cleanpath
       
    50 touch quux
       
    51 hg commit -d '0 0' -m commit-16 quux 2>&1 | cleanpath
       
    52 echo >> dir/file
       
    53 hg -v commit -d '0 0' -m commit-17 dir/file
    21 cd ..
    54 cd ..
    22 
    55 
    23 echo % partial subdir commit test
    56 echo % partial subdir commit test
    24 hg init test2
    57 hg init test2
    25 cd test2
    58 cd test2