Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-git-export @ 3064:fbd3f9fd645d
hgk.py: use mercurial.patch functions when possible
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 07 Sep 2006 14:13:01 +0200 |
parents | 035fd2029575 |
children | 096f1c73cdc3 |
rev | line source |
---|---|
2892 | 1 #!/bin/sh |
2 | |
3 hg init a | |
4 cd a | |
5 | |
6 echo start > start | |
7 hg ci -Amstart -d '0 0' | |
8 echo new > new | |
9 hg ci -Amnew -d '0 0' | |
10 echo '% new file' | |
2935 | 11 hg diff --git -r 0 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
12 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
2892 | 13 |
14 hg cp new copy | |
15 hg ci -mcopy -d '0 0' | |
16 echo '% copy' | |
2935 | 17 hg diff --git -r 1:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
18 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
2892 | 19 |
20 hg mv copy rename | |
21 hg ci -mrename -d '0 0' | |
22 echo '% rename' | |
2935 | 23 hg diff --git -r 2:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
24 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
2892 | 25 |
26 hg rm rename | |
27 hg ci -mdelete -d '0 0' | |
28 echo '% delete' | |
2935 | 29 hg diff --git -r 3:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
30 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
2892 | 31 |
32 cat > src <<EOF | |
33 1 | |
34 2 | |
35 3 | |
36 4 | |
37 5 | |
38 EOF | |
39 hg ci -Amsrc -d '0 0' | |
40 chmod +x src | |
41 hg ci -munexec -d '0 0' | |
42 echo '% chmod 644' | |
2935 | 43 hg diff --git -r 5:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
44 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
2892 | 45 |
46 hg mv src dst | |
47 chmod -x dst | |
48 echo a >> dst | |
49 hg ci -mrenamemod -d '0 0' | |
50 echo '% rename+mod+chmod' | |
2935 | 51 hg diff --git -r 6:tip | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
52 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
3063
035fd2029575
git --diff: fix traceback when getting mode change
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2935
diff
changeset
|
53 |
035fd2029575
git --diff: fix traceback when getting mode change
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2935
diff
changeset
|
54 echo '% nonexistent in tip+chmod' |
035fd2029575
git --diff: fix traceback when getting mode change
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2935
diff
changeset
|
55 hg diff --git -r 5:6 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
035fd2029575
git --diff: fix traceback when getting mode change
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2935
diff
changeset
|
56 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |