tests/test-git-export
changeset 3199 096f1c73cdc3
parent 3066 035fd2029575
child 3368 751df21dad72
equal deleted inserted replaced
3198:a32f65549b9e 3199:096f1c73cdc3
     6 echo start > start
     6 echo start > start
     7 hg ci -Amstart -d '0 0'
     7 hg ci -Amstart -d '0 0'
     8 echo new > new
     8 echo new > new
     9 hg ci -Amnew -d '0 0'
     9 hg ci -Amnew -d '0 0'
    10 echo '% new file'
    10 echo '% new file'
    11 hg diff --git -r 0 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    11 hg diff --git -r 0
    12     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
       
    13 
    12 
    14 hg cp new copy
    13 hg cp new copy
    15 hg ci -mcopy -d '0 0'
    14 hg ci -mcopy -d '0 0'
    16 echo '% copy'
    15 echo '% copy'
    17 hg diff --git -r 1:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    16 hg diff --git -r 1:tip
    18     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
       
    19 
    17 
    20 hg mv copy rename
    18 hg mv copy rename
    21 hg ci -mrename -d '0 0'
    19 hg ci -mrename -d '0 0'
    22 echo '% rename'
    20 echo '% rename'
    23 hg diff --git -r 2:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    21 hg diff --git -r 2:tip
    24     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
       
    25 
    22 
    26 hg rm rename
    23 hg rm rename
    27 hg ci -mdelete -d '0 0'
    24 hg ci -mdelete -d '0 0'
    28 echo '% delete'
    25 echo '% delete'
    29 hg diff --git -r 3:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    26 hg diff --git -r 3:tip
    30     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
       
    31 
    27 
    32 cat > src <<EOF
    28 cat > src <<EOF
    33 1
    29 1
    34 2
    30 2
    35 3
    31 3
    38 EOF
    34 EOF
    39 hg ci -Amsrc -d '0 0'
    35 hg ci -Amsrc -d '0 0'
    40 chmod +x src
    36 chmod +x src
    41 hg ci -munexec -d '0 0'
    37 hg ci -munexec -d '0 0'
    42 echo '% chmod 644'
    38 echo '% chmod 644'
    43 hg diff --git -r 5:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    39 hg diff --git -r 5:tip
    44     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
       
    45 
    40 
    46 hg mv src dst
    41 hg mv src dst
    47 chmod -x dst
    42 chmod -x dst
    48 echo a >> dst
    43 echo a >> dst
    49 hg ci -mrenamemod -d '0 0'
    44 hg ci -mrenamemod -d '0 0'
    50 echo '% rename+mod+chmod'
    45 echo '% rename+mod+chmod'
    51 hg diff --git -r 6:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    46 hg diff --git -r 6:tip
    52     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
       
    53 
    47 
    54 echo '% nonexistent in tip+chmod'
    48 echo '% nonexistent in tip+chmod'
    55 hg diff --git -r 5:6 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
    49 hg diff --git -r 5:6
    56     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"