Show More
1 | NO CONTENT: file copied from templates/static/hgicon.png to tests/binfile.bin |
|
NO CONTENT: file copied from templates/static/hgicon.png to tests/binfile.bin |
@@ -1,49 +1,62 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init a |
|
3 | hg init a | |
4 | cd a |
|
4 | cd a | |
5 |
|
5 | |||
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 |
|
11 | hg diff --git -r 0 | |
12 |
|
12 | |||
13 | hg cp new copy |
|
13 | hg cp new copy | |
14 | hg ci -mcopy -d '0 0' |
|
14 | hg ci -mcopy -d '0 0' | |
15 | echo '% copy' |
|
15 | echo '% copy' | |
16 | hg diff --git -r 1:tip |
|
16 | hg diff --git -r 1:tip | |
17 |
|
17 | |||
18 | hg mv copy rename |
|
18 | hg mv copy rename | |
19 | hg ci -mrename -d '0 0' |
|
19 | hg ci -mrename -d '0 0' | |
20 | echo '% rename' |
|
20 | echo '% rename' | |
21 | hg diff --git -r 2:tip |
|
21 | hg diff --git -r 2:tip | |
22 |
|
22 | |||
23 | hg rm rename |
|
23 | hg rm rename | |
24 | hg ci -mdelete -d '0 0' |
|
24 | hg ci -mdelete -d '0 0' | |
25 | echo '% delete' |
|
25 | echo '% delete' | |
26 | hg diff --git -r 3:tip |
|
26 | hg diff --git -r 3:tip | |
27 |
|
27 | |||
28 | cat > src <<EOF |
|
28 | cat > src <<EOF | |
29 | 1 |
|
29 | 1 | |
30 | 2 |
|
30 | 2 | |
31 | 3 |
|
31 | 3 | |
32 | 4 |
|
32 | 4 | |
33 | 5 |
|
33 | 5 | |
34 | EOF |
|
34 | EOF | |
35 | hg ci -Amsrc -d '0 0' |
|
35 | hg ci -Amsrc -d '0 0' | |
36 | chmod +x src |
|
36 | chmod +x src | |
37 | hg ci -munexec -d '0 0' |
|
37 | hg ci -munexec -d '0 0' | |
38 | echo '% chmod 644' |
|
38 | echo '% chmod 644' | |
39 | hg diff --git -r 5:tip |
|
39 | hg diff --git -r 5:tip | |
40 |
|
40 | |||
41 | hg mv src dst |
|
41 | hg mv src dst | |
42 | chmod -x dst |
|
42 | chmod -x dst | |
43 | echo a >> dst |
|
43 | echo a >> dst | |
44 | hg ci -mrenamemod -d '0 0' |
|
44 | hg ci -mrenamemod -d '0 0' | |
45 | echo '% rename+mod+chmod' |
|
45 | echo '% rename+mod+chmod' | |
46 | hg diff --git -r 6:tip |
|
46 | hg diff --git -r 6:tip | |
47 |
|
47 | |||
48 | echo '% nonexistent in tip+chmod' |
|
48 | echo '% nonexistent in tip+chmod' | |
49 | hg diff --git -r 5:6 |
|
49 | hg diff --git -r 5:6 | |
|
50 | ||||
|
51 | echo '% binary diff' | |||
|
52 | cp $TESTDIR/binfile.bin . | |||
|
53 | hg add binfile.bin | |||
|
54 | hg diff --git > b.diff | |||
|
55 | cat b.diff | |||
|
56 | ||||
|
57 | echo '% import binary diff' | |||
|
58 | hg revert binfile.bin | |||
|
59 | rm binfile.bin | |||
|
60 | hg import -mfoo b.diff | |||
|
61 | cmp binfile.bin $TESTDIR/binfile.bin | |||
|
62 |
@@ -1,46 +1,67 b'' | |||||
1 | adding start |
|
1 | adding start | |
2 | adding new |
|
2 | adding new | |
3 | % new file |
|
3 | % new file | |
4 | diff --git a/new b/new |
|
4 | diff --git a/new b/new | |
5 | new file mode 100644 |
|
5 | new file mode 100644 | |
6 | --- /dev/null |
|
6 | --- /dev/null | |
7 | +++ b/new |
|
7 | +++ b/new | |
8 | @@ -0,0 +1,1 @@ |
|
8 | @@ -0,0 +1,1 @@ | |
9 | +new |
|
9 | +new | |
10 | % copy |
|
10 | % copy | |
11 | diff --git a/new b/copy |
|
11 | diff --git a/new b/copy | |
12 | copy from new |
|
12 | copy from new | |
13 | copy to copy |
|
13 | copy to copy | |
14 | % rename |
|
14 | % rename | |
15 | diff --git a/copy b/rename |
|
15 | diff --git a/copy b/rename | |
16 | rename from copy |
|
16 | rename from copy | |
17 | rename to rename |
|
17 | rename to rename | |
18 | % delete |
|
18 | % delete | |
19 | diff --git a/rename b/rename |
|
19 | diff --git a/rename b/rename | |
20 | deleted file mode 100644 |
|
20 | deleted file mode 100644 | |
21 | --- a/rename |
|
21 | --- a/rename | |
22 | +++ /dev/null |
|
22 | +++ /dev/null | |
23 | @@ -1,1 +0,0 @@ |
|
23 | @@ -1,1 +0,0 @@ | |
24 | -new |
|
24 | -new | |
25 | adding src |
|
25 | adding src | |
26 | % chmod 644 |
|
26 | % chmod 644 | |
27 | diff --git a/src b/src |
|
27 | diff --git a/src b/src | |
28 | old mode 100644 |
|
28 | old mode 100644 | |
29 | new mode 100755 |
|
29 | new mode 100755 | |
30 | % rename+mod+chmod |
|
30 | % rename+mod+chmod | |
31 | diff --git a/src b/dst |
|
31 | diff --git a/src b/dst | |
32 | old mode 100755 |
|
32 | old mode 100755 | |
33 | new mode 100644 |
|
33 | new mode 100644 | |
34 | rename from src |
|
34 | rename from src | |
35 | rename to dst |
|
35 | rename to dst | |
36 | --- a/dst |
|
36 | --- a/dst | |
37 | +++ b/dst |
|
37 | +++ b/dst | |
38 | @@ -3,3 +3,4 @@ 3 |
|
38 | @@ -3,3 +3,4 @@ 3 | |
39 | 3 |
|
39 | 3 | |
40 | 4 |
|
40 | 4 | |
41 | 5 |
|
41 | 5 | |
42 | +a |
|
42 | +a | |
43 | % nonexistent in tip+chmod |
|
43 | % nonexistent in tip+chmod | |
44 | diff --git a/src b/src |
|
44 | diff --git a/src b/src | |
45 | old mode 100644 |
|
45 | old mode 100644 | |
46 | new mode 100755 |
|
46 | new mode 100755 | |
|
47 | % binary diff | |||
|
48 | diff --git a/binfile.bin b/binfile.bin | |||
|
49 | new file mode 100644 | |||
|
50 | index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 | |||
|
51 | GIT binary patch | |||
|
52 | literal 593 | |||
|
53 | zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU | |||
|
54 | z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd | |||
|
55 | zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M | |||
|
56 | z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT | |||
|
57 | zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po | |||
|
58 | ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; | |||
|
59 | zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V | |||
|
60 | z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- | |||
|
61 | zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; | |||
|
62 | z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K | |||
|
63 | zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= | |||
|
64 | fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 | |||
|
65 | ||||
|
66 | % import binary diff | |||
|
67 | applying b.diff |
General Comments 0
You need to be logged in to leave comments.
Login now