Show More
@@ -1569,6 +1569,9 b' def trydiff(repo, revs, ctx1, ctx2, modi' | |||
|
1569 | 1569 | header.append('new file mode %s\n' % mode) |
|
1570 | 1570 | elif ctx2.flags(f): |
|
1571 | 1571 | losedatafn(f) |
|
1572 | # In theory, if tn was copied or renamed we should check | |
|
1573 | # if the source is binary too but the copy record already | |
|
1574 | # forces git mode. | |
|
1572 | 1575 | if util.binary(tn): |
|
1573 | 1576 | if opts.git: |
|
1574 | 1577 | dodiff = 'binary' |
@@ -20,6 +20,7 b' echo unsetexec > unsetexec' | |||
|
20 | 20 | chmod +x unsetexec |
|
21 | 21 | echo binary > binary |
|
22 | 22 | python -c "file('rmbinary', 'wb').write('\0')" |
|
23 | python -c "file('bintoregular', 'wb').write('\0')" | |
|
23 | 24 | hg ci -Am addfiles |
|
24 | 25 | echo regular >> regular |
|
25 | 26 | echo newregular >> newregular |
@@ -28,6 +29,7 b' touch newempty' | |||
|
28 | 29 | rm rmregular |
|
29 | 30 | echo exec >> exec |
|
30 | 31 | echo newexec > newexec |
|
32 | echo bintoregular > bintoregular | |
|
31 | 33 | chmod +x newexec |
|
32 | 34 | rm rmexec |
|
33 | 35 | chmod +x setexec |
@@ -46,7 +48,8 b' hg autodiff --git=yes regular' | |||
|
46 | 48 | echo '% git=auto: regular diff for regular files and non-binary removals' |
|
47 | 49 | hg autodiff --git=auto regular newregular rmregular rmexec |
|
48 | 50 | |
|
49 |
for f in exec newexec setexec unsetexec binary newbinary newempty rmempty |
|
|
51 | for f in exec newexec setexec unsetexec binary newbinary newempty rmempty \ | |
|
52 | rmbinary bintoregular; do | |
|
50 | 53 | echo '% git=auto: git diff for' $f |
|
51 | 54 | hg autodiff --git=auto $f |
|
52 | 55 | done |
@@ -1,5 +1,6 b'' | |||
|
1 | 1 | % make a combination of new, changed and deleted file |
|
2 | 2 | adding binary |
|
3 | adding bintoregular | |
|
3 | 4 | adding exec |
|
4 | 5 | adding regular |
|
5 | 6 | adding rmbinary |
@@ -17,40 +18,42 b' removing rmempty' | |||
|
17 | 18 | removing rmexec |
|
18 | 19 | removing rmregular |
|
19 | 20 | % git=no: regular diff for all files |
|
20 |
diff -r |
|
|
21 | diff -r a66d19b9302d binary | |
|
21 | 22 | Binary file binary has changed |
|
22 | diff -r b3f053cd7c7f exec | |
|
23 | diff -r a66d19b9302d bintoregular | |
|
24 | Binary file bintoregular has changed | |
|
25 | diff -r a66d19b9302d exec | |
|
23 | 26 | --- a/exec |
|
24 | 27 | +++ b/exec |
|
25 | 28 | @@ -1,1 +1,2 @@ |
|
26 | 29 | exec |
|
27 | 30 | +exec |
|
28 |
diff -r |
|
|
31 | diff -r a66d19b9302d newbinary | |
|
29 | 32 | Binary file newbinary has changed |
|
30 |
diff -r |
|
|
33 | diff -r a66d19b9302d newexec | |
|
31 | 34 | --- /dev/null |
|
32 | 35 | +++ b/newexec |
|
33 | 36 | @@ -0,0 +1,1 @@ |
|
34 | 37 | +newexec |
|
35 |
diff -r |
|
|
38 | diff -r a66d19b9302d newregular | |
|
36 | 39 | --- /dev/null |
|
37 | 40 | +++ b/newregular |
|
38 | 41 | @@ -0,0 +1,1 @@ |
|
39 | 42 | +newregular |
|
40 |
diff -r |
|
|
43 | diff -r a66d19b9302d regular | |
|
41 | 44 | --- a/regular |
|
42 | 45 | +++ b/regular |
|
43 | 46 | @@ -1,1 +1,2 @@ |
|
44 | 47 | regular |
|
45 | 48 | +regular |
|
46 |
diff -r |
|
|
49 | diff -r a66d19b9302d rmbinary | |
|
47 | 50 | Binary file rmbinary has changed |
|
48 |
diff -r |
|
|
51 | diff -r a66d19b9302d rmexec | |
|
49 | 52 | --- a/rmexec |
|
50 | 53 | +++ /dev/null |
|
51 | 54 | @@ -1,1 +0,0 @@ |
|
52 | 55 | -rmexec |
|
53 |
diff -r |
|
|
56 | diff -r a66d19b9302d rmregular | |
|
54 | 57 | --- a/rmregular |
|
55 | 58 | +++ /dev/null |
|
56 | 59 | @@ -1,1 +0,0 @@ |
@@ -63,29 +66,29 b' diff --git a/regular b/regular' | |||
|
63 | 66 | regular |
|
64 | 67 | +regular |
|
65 | 68 | % git=auto: regular diff for regular files and non-binary removals |
|
66 |
diff -r |
|
|
69 | diff -r a66d19b9302d newregular | |
|
67 | 70 | --- /dev/null |
|
68 | 71 | +++ b/newregular |
|
69 | 72 | @@ -0,0 +1,1 @@ |
|
70 | 73 | +newregular |
|
71 |
diff -r |
|
|
74 | diff -r a66d19b9302d regular | |
|
72 | 75 | --- a/regular |
|
73 | 76 | +++ b/regular |
|
74 | 77 | @@ -1,1 +1,2 @@ |
|
75 | 78 | regular |
|
76 | 79 | +regular |
|
77 |
diff -r |
|
|
80 | diff -r a66d19b9302d rmexec | |
|
78 | 81 | --- a/rmexec |
|
79 | 82 | +++ /dev/null |
|
80 | 83 | @@ -1,1 +0,0 @@ |
|
81 | 84 | -rmexec |
|
82 |
diff -r |
|
|
85 | diff -r a66d19b9302d rmregular | |
|
83 | 86 | --- a/rmregular |
|
84 | 87 | +++ /dev/null |
|
85 | 88 | @@ -1,1 +0,0 @@ |
|
86 | 89 | -rmregular |
|
87 | 90 | % git=auto: git diff for exec |
|
88 |
diff -r |
|
|
91 | diff -r a66d19b9302d exec | |
|
89 | 92 | --- a/exec |
|
90 | 93 | +++ b/exec |
|
91 | 94 | @@ -1,1 +1,2 @@ |
@@ -131,46 +134,56 b' deleted file mode 100644' | |||
|
131 | 134 | diff --git a/rmbinary b/rmbinary |
|
132 | 135 | deleted file mode 100644 |
|
133 | 136 | Binary file rmbinary has changed |
|
137 | % git=auto: git diff for bintoregular | |
|
138 | diff --git a/bintoregular b/bintoregular | |
|
139 | index f76dd238ade08917e6712764a16a22005a50573d..9c42f2b6427d8bf034b7bc23986152dc01bfd3ab | |
|
140 | GIT binary patch | |
|
141 | literal 13 | |
|
142 | Uc$`bh%qz(+N=+}#Ni5<5043uE82|tP | |
|
143 | ||
|
134 | 144 | % git=warn: regular diff with data loss warnings |
|
135 |
diff -r |
|
|
145 | diff -r a66d19b9302d binary | |
|
136 | 146 | Binary file binary has changed |
|
137 | diff -r b3f053cd7c7f exec | |
|
147 | diff -r a66d19b9302d bintoregular | |
|
148 | Binary file bintoregular has changed | |
|
149 | diff -r a66d19b9302d exec | |
|
138 | 150 | --- a/exec |
|
139 | 151 | +++ b/exec |
|
140 | 152 | @@ -1,1 +1,2 @@ |
|
141 | 153 | exec |
|
142 | 154 | +exec |
|
143 |
diff -r |
|
|
155 | diff -r a66d19b9302d newbinary | |
|
144 | 156 | Binary file newbinary has changed |
|
145 |
diff -r |
|
|
157 | diff -r a66d19b9302d newexec | |
|
146 | 158 | --- /dev/null |
|
147 | 159 | +++ b/newexec |
|
148 | 160 | @@ -0,0 +1,1 @@ |
|
149 | 161 | +newexec |
|
150 |
diff -r |
|
|
162 | diff -r a66d19b9302d newregular | |
|
151 | 163 | --- /dev/null |
|
152 | 164 | +++ b/newregular |
|
153 | 165 | @@ -0,0 +1,1 @@ |
|
154 | 166 | +newregular |
|
155 |
diff -r |
|
|
167 | diff -r a66d19b9302d regular | |
|
156 | 168 | --- a/regular |
|
157 | 169 | +++ b/regular |
|
158 | 170 | @@ -1,1 +1,2 @@ |
|
159 | 171 | regular |
|
160 | 172 | +regular |
|
161 |
diff -r |
|
|
173 | diff -r a66d19b9302d rmbinary | |
|
162 | 174 | Binary file rmbinary has changed |
|
163 |
diff -r |
|
|
175 | diff -r a66d19b9302d rmexec | |
|
164 | 176 | --- a/rmexec |
|
165 | 177 | +++ /dev/null |
|
166 | 178 | @@ -1,1 +0,0 @@ |
|
167 | 179 | -rmexec |
|
168 |
diff -r |
|
|
180 | diff -r a66d19b9302d rmregular | |
|
169 | 181 | --- a/rmregular |
|
170 | 182 | +++ /dev/null |
|
171 | 183 | @@ -1,1 +0,0 @@ |
|
172 | 184 | -rmregular |
|
173 | 185 | data lost for: binary |
|
186 | data lost for: bintoregular | |
|
174 | 187 | data lost for: newbinary |
|
175 | 188 | data lost for: newempty |
|
176 | 189 | data lost for: newexec |
@@ -181,7 +194,7 b' data lost for: unsetexec' | |||
|
181 | 194 | % git=abort: fail on execute bit change |
|
182 | 195 | abort: losing data for setexec |
|
183 | 196 | % git=abort: succeed on regular file |
|
184 |
diff -r |
|
|
197 | diff -r a66d19b9302d regular | |
|
185 | 198 | --- a/regular |
|
186 | 199 | +++ b/regular |
|
187 | 200 | @@ -1,1 +1,2 @@ |
General Comments 0
You need to be logged in to leave comments.
Login now