Mercurial > hg
annotate tests/test-git-export.t @ 16312:ab09347f8c5c stable
i18n-ja: synchronized with cb17c2f5b7b4
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 30 Mar 2012 21:18:37 +0900 |
parents | db0340f4b507 |
children | 4f795f5fbb0b |
rev | line source |
---|---|
15442
db0340f4b507
tests: use 'hghave execbit' for tests that manipulate x bit in file system
Mads Kiilerich <mads@kiilerich.com>
parents:
12193
diff
changeset
|
1 $ "$TESTDIR/hghave" execbit || exit 80 |
db0340f4b507
tests: use 'hghave execbit' for tests that manipulate x bit in file system
Mads Kiilerich <mads@kiilerich.com>
parents:
12193
diff
changeset
|
2 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
3 $ hg init |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
4 $ echo start > start |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
5 $ hg ci -Amstart |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
6 adding start |
2907 | 7 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
8 New file: |
2907 | 9 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
10 $ echo new > new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
11 $ hg ci -Amnew |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
12 adding new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
13 $ hg diff --git -r 0 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
14 diff --git a/new b/new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
15 new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
16 --- /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
17 +++ b/new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
18 @@ -0,0 +1,1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
19 +new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
20 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
21 Copy: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
22 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
23 $ hg cp new copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
24 $ hg ci -mcopy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
25 $ hg diff --git -r 1:tip |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
26 diff --git a/new b/copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
27 copy from new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
28 copy to copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
29 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
30 Rename: |
2907 | 31 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
32 $ hg mv copy rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
33 $ hg ci -mrename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
34 $ hg diff --git -r 2:tip |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
35 diff --git a/copy b/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
36 rename from copy |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
37 rename to rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
38 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
39 Delete: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
40 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
41 $ hg rm rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
42 $ hg ci -mdelete |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
43 $ hg diff --git -r 3:tip |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
44 diff --git a/rename b/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
45 deleted file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
46 --- a/rename |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
47 +++ /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
48 @@ -1,1 +0,0 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
49 -new |
2907 | 50 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
51 $ cat > src <<EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
52 > 1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
53 > 2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
54 > 3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
55 > 4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
56 > 5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
57 > EOF |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
58 $ hg ci -Amsrc |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
59 adding src |
2907 | 60 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
61 chmod 644: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
62 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
63 $ chmod +x src |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
64 $ hg ci -munexec |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
65 $ hg diff --git -r 5:tip |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
66 diff --git a/src b/src |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
67 old mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
68 new mode 100755 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
69 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
70 Rename+mod+chmod: |
2907 | 71 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
72 $ hg mv src dst |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
73 $ chmod -x dst |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
74 $ echo a >> dst |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
75 $ hg ci -mrenamemod |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
76 $ hg diff --git -r 6:tip |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
77 diff --git a/src b/dst |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
78 old mode 100755 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
79 new mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
80 rename from src |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
81 rename to dst |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
82 --- a/src |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
83 +++ b/dst |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
84 @@ -3,3 +3,4 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
85 3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
86 4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
87 5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
88 +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
89 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
90 Nonexistent in tip+chmod: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
91 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
92 $ hg diff --git -r 5:6 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
93 diff --git a/src b/src |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
94 old mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
95 new mode 100755 |
2907 | 96 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
97 Binary diff: |
3066
035fd2029575
git --diff: fix traceback when getting mode change
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2935
diff
changeset
|
98 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
99 $ cp $TESTDIR/binfile.bin . |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
100 $ hg add binfile.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
101 $ hg diff --git > b.diff |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
102 $ cat b.diff |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
103 diff --git a/binfile.bin b/binfile.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
104 new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
105 index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
106 GIT binary patch |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
107 literal 593 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
108 zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
109 z000XU0RWnu7ytkO2XskIMF-Uh9TW;VpMjwv0005-Nkl<ZD9@FWPs=e;7{<>W$NUkd |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
110 zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
111 z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
112 zLdY<T=ks|woh-`&01!ej#(xbV1f|pI*=%;d-%F*E*X#ZH`4I%6SS+$EJDE&ct=8po |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
113 ziN#{?_j|kD%Cd|oiqds`xm@;oJ-^?NG3Gdqrs?5u*zI;{nogxsx~^|Fn^Y?Gdc6<; |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
114 zfMJ+iF1J`LMx&A2?dEwNW8ClebzPTbIh{@$hS6*`kH@1d%Lo7fA#}N1)oN7`gm$~V |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
115 z+wDx#)OFqMcE{s!JN0-xhG8ItAjVkJwEcb`3WWlJfU2r?;Pd%dmR+q@mSri5q9_W- |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
116 zaR2~ECX?B2w+zELozC0s*6Z~|QG^f{3I#<`?)Q7U-JZ|q5W;9Q8i_=pBuSzunx=U; |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
117 z9C)5jBoYw9^?EHyQl(M}1OlQcCX>lXB*ODN003Z&P17_@)3Pi=i0wb04<W?v-u}7K |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
118 zXmmQA+wDgE!qR9o8jr`%=ab_&uh(l?R=r;Tjiqon91I2-hIu?57~@*4h7h9uORK#= |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
119 fQItJW-{SoTm)8|5##k|m00000NkvXXu0mjf{mKw4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
120 |
3368
751df21dad72
Add test for git binary diff support
Brendan Cully <brendan@kublai.com>
parents:
3199
diff
changeset
|
121 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
122 Import binary diff: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
123 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
124 $ hg revert binfile.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
125 $ rm binfile.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
126 $ hg import -mfoo b.diff |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
127 applying b.diff |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
128 $ cmp binfile.bin $TESTDIR/binfile.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
129 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
130 Rename binary file: |
3368
751df21dad72
Add test for git binary diff support
Brendan Cully <brendan@kublai.com>
parents:
3199
diff
changeset
|
131 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
132 $ hg mv binfile.bin renamed.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
133 $ hg diff --git |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
134 diff --git a/binfile.bin b/renamed.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
135 rename from binfile.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
136 rename to renamed.bin |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
137 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
138 Diff across many revisions: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
139 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
140 $ hg mv dst dst2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
141 $ hg ci -m 'mv dst dst2' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
142 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
143 $ echo >> start |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
144 $ hg ci -m 'change start' |
3368
751df21dad72
Add test for git binary diff support
Brendan Cully <brendan@kublai.com>
parents:
3199
diff
changeset
|
145 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
146 $ hg revert -r -2 start |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
147 $ hg mv dst2 dst3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
148 $ hg ci -m 'mv dst2 dst3; revert start' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
149 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
150 $ hg diff --git -r 9:11 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
151 diff --git a/dst2 b/dst3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
152 rename from dst2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
153 rename to dst3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
154 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
155 Reversed: |
4092
4ced663bebf0
git patches: handle renames of binary files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3702
diff
changeset
|
156 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
157 $ hg diff --git -r 11:9 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
158 diff --git a/dst3 b/dst2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
159 rename from dst3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
160 rename to dst2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
161 |
3693
454b3a8cdf28
diff: improve detection of renames when diffing across many revisions
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3368
diff
changeset
|
162 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
163 $ echo a >> foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
164 $ hg add foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
165 $ hg ci -m 'add foo' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
166 $ echo b >> foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
167 $ hg ci -m 'change foo' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
168 $ hg mv foo bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
169 $ hg ci -m 'mv foo bar' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
170 $ echo c >> bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
171 $ hg ci -m 'change bar' |
3693
454b3a8cdf28
diff: improve detection of renames when diffing across many revisions
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3368
diff
changeset
|
172 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
173 File created before r1 and renamed before r2: |
3693
454b3a8cdf28
diff: improve detection of renames when diffing across many revisions
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3368
diff
changeset
|
174 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
175 $ hg diff --git -r -3:-1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
176 diff --git a/foo b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
177 rename from foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
178 rename to bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
179 --- a/foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
180 +++ b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
181 @@ -1,2 +1,3 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
182 a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
183 b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
184 +c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
185 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
186 Reversed: |
3694
c0b1a0c72c7d
renamedbetween: only return (file, node) pairs that exist in the original rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3693
diff
changeset
|
187 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
188 $ hg diff --git -r -1:-3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
189 diff --git a/bar b/foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
190 rename from bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
191 rename to foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
192 --- a/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
193 +++ b/foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
194 @@ -1,3 +1,2 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
195 a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
196 b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
197 -c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
198 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
199 File created in r1 and renamed before r2: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
200 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
201 $ hg diff --git -r -4:-1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
202 diff --git a/foo b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
203 rename from foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
204 rename to bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
205 --- a/foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
206 +++ b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
207 @@ -1,1 +1,3 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
208 a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
209 +b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
210 +c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
211 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
212 Reversed: |
3694
c0b1a0c72c7d
renamedbetween: only return (file, node) pairs that exist in the original rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3693
diff
changeset
|
213 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
214 $ hg diff --git -r -1:-4 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
215 diff --git a/bar b/foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
216 rename from bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
217 rename to foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
218 --- a/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
219 +++ b/foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
220 @@ -1,3 +1,1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
221 a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
222 -b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
223 -c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
224 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
225 File created after r1 and renamed before r2: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
226 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
227 $ hg diff --git -r -5:-1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
228 diff --git a/bar b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
229 new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
230 --- /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
231 +++ b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
232 @@ -0,0 +1,3 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
233 +a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
234 +b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
235 +c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
236 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
237 Reversed: |
3694
c0b1a0c72c7d
renamedbetween: only return (file, node) pairs that exist in the original rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3693
diff
changeset
|
238 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
239 $ hg diff --git -r -1:-5 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
240 diff --git a/bar b/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
241 deleted file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
242 --- a/bar |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
243 +++ /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
244 @@ -1,3 +0,0 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
245 -a |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
246 -b |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
247 -c |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
248 |
3695
3a2fc90d27d6
fix typo in mercurial/patch.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3694
diff
changeset
|
249 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
250 Comparing with the working dir: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
251 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
252 $ echo >> start |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
253 $ hg ci -m 'change start again' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
254 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
255 $ echo > created |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
256 $ hg add created |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
257 $ hg ci -m 'add created' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
258 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
259 $ hg mv created created2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
260 $ hg ci -m 'mv created created2' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
261 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
262 $ hg mv created2 created3 |
3695
3a2fc90d27d6
fix typo in mercurial/patch.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3694
diff
changeset
|
263 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
264 There's a copy in the working dir: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
265 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
266 $ hg diff --git |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
267 diff --git a/created2 b/created3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
268 rename from created2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
269 rename to created3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
270 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
271 There's another copy between the original rev and the wd: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
272 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
273 $ hg diff --git -r -2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
274 diff --git a/created b/created3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
275 rename from created |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
276 rename to created3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
277 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
278 The source of the copy was created after the original rev: |
3695
3a2fc90d27d6
fix typo in mercurial/patch.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3694
diff
changeset
|
279 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
280 $ hg diff --git -r -3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
281 diff --git a/created3 b/created3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
282 new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
283 --- /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
284 +++ b/created3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
285 @@ -0,0 +1,1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
286 + |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
287 $ hg ci -m 'mv created2 created3' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
288 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
289 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
290 $ echo > brand-new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
291 $ hg add brand-new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
292 $ hg ci -m 'add brand-new' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
293 $ hg mv brand-new brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
294 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
295 Created in parent of wd; renamed in the wd: |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
296 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
297 $ hg diff --git |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
298 diff --git a/brand-new b/brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
299 rename from brand-new |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
300 rename to brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
301 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
302 Created between r1 and parent of wd; renamed in the wd: |
3696
562a65635bcb
diff: better detection of renames when comparing with the working dir.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3695
diff
changeset
|
303 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
304 $ hg diff --git -r -2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
305 diff --git a/brand-new2 b/brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
306 new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
307 --- /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
308 +++ b/brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
309 @@ -0,0 +1,1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
310 + |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
311 $ hg ci -m 'mv brand-new brand-new2' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
312 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
313 One file is copied to many destinations and removed: |
3696
562a65635bcb
diff: better detection of renames when comparing with the working dir.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3695
diff
changeset
|
314 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
315 $ hg cp brand-new2 brand-new3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
316 $ hg mv brand-new2 brand-new3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
317 $ hg ci -m 'multiple renames/copies' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
318 $ hg diff --git -r -2 -r -1 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
319 diff --git a/brand-new2 b/brand-new3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
320 rename from brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
321 rename to brand-new3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
322 diff --git a/brand-new2 b/brand-new3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
323 copy from brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
324 copy to brand-new3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
325 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
326 Reversed: |
3702
70c3ee224c08
Don't generate git patches that rename a file to multiple destinations
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3696
diff
changeset
|
327 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
328 $ hg diff --git -r -1 -r -2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
329 diff --git a/brand-new3 b/brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
330 rename from brand-new3 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
331 rename to brand-new2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
332 diff --git a/brand-new3-2 b/brand-new3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
333 deleted file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
334 --- a/brand-new3-2 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
335 +++ /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
336 @@ -1,1 +0,0 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
337 - |
3702
70c3ee224c08
Don't generate git patches that rename a file to multiple destinations
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3696
diff
changeset
|
338 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
339 There should be a trailing TAB if there are spaces in the file name: |
4679
826659bd8053
git patches: correct handling of filenames with spaces
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
340 |
12193
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
341 $ echo foo > 'with spaces' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
342 $ hg add 'with spaces' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
343 $ hg diff --git |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
344 diff --git a/with spaces b/with spaces |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
345 new file mode 100644 |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
346 --- /dev/null |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
347 +++ b/with spaces |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
348 @@ -0,0 +1,1 @@ |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
349 +foo |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
350 $ hg ci -m 'add filename with spaces' |
927e1a677267
tests: unify test-git-*
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
351 |