##// END OF EJS Templates
test-import-git.t: work around check-code hating on ^ and $( in tests
Augie Fackler -
r20138:db0f8738 default
parent child Browse files
Show More
@@ -1,720 +1,723 b''
1 $ hg init repo
1 $ hg init repo
2 $ cd repo
2 $ cd repo
3
3
4 New file:
4 New file:
5
5
6 $ hg import -d "1000000 0" -mnew - <<EOF
6 $ hg import -d "1000000 0" -mnew - <<EOF
7 > diff --git a/new b/new
7 > diff --git a/new b/new
8 > new file mode 100644
8 > new file mode 100644
9 > index 0000000..7898192
9 > index 0000000..7898192
10 > --- /dev/null
10 > --- /dev/null
11 > +++ b/new
11 > +++ b/new
12 > @@ -0,0 +1 @@
12 > @@ -0,0 +1 @@
13 > +a
13 > +a
14 > EOF
14 > EOF
15 applying patch from stdin
15 applying patch from stdin
16
16
17 $ hg tip -q
17 $ hg tip -q
18 0:ae3ee40d2079
18 0:ae3ee40d2079
19
19
20 New empty file:
20 New empty file:
21
21
22 $ hg import -d "1000000 0" -mempty - <<EOF
22 $ hg import -d "1000000 0" -mempty - <<EOF
23 > diff --git a/empty b/empty
23 > diff --git a/empty b/empty
24 > new file mode 100644
24 > new file mode 100644
25 > EOF
25 > EOF
26 applying patch from stdin
26 applying patch from stdin
27
27
28 $ hg tip -q
28 $ hg tip -q
29 1:ab199dc869b5
29 1:ab199dc869b5
30
30
31 $ hg locate empty
31 $ hg locate empty
32 empty
32 empty
33
33
34 chmod +x:
34 chmod +x:
35
35
36 $ hg import -d "1000000 0" -msetx - <<EOF
36 $ hg import -d "1000000 0" -msetx - <<EOF
37 > diff --git a/new b/new
37 > diff --git a/new b/new
38 > old mode 100644
38 > old mode 100644
39 > new mode 100755
39 > new mode 100755
40 > EOF
40 > EOF
41 applying patch from stdin
41 applying patch from stdin
42
42
43 #if execbit
43 #if execbit
44 $ hg tip -q
44 $ hg tip -q
45 2:3a34410f282e
45 2:3a34410f282e
46 $ test -x new
46 $ test -x new
47 $ hg rollback -q
47 $ hg rollback -q
48 #else
48 #else
49 $ hg tip -q
49 $ hg tip -q
50 1:ab199dc869b5
50 1:ab199dc869b5
51 #endif
51 #endif
52
52
53 Copy and removing x bit:
53 Copy and removing x bit:
54
54
55 $ hg import -f -d "1000000 0" -mcopy - <<EOF
55 $ hg import -f -d "1000000 0" -mcopy - <<EOF
56 > diff --git a/new b/copy
56 > diff --git a/new b/copy
57 > old mode 100755
57 > old mode 100755
58 > new mode 100644
58 > new mode 100644
59 > similarity index 100%
59 > similarity index 100%
60 > copy from new
60 > copy from new
61 > copy to copy
61 > copy to copy
62 > diff --git a/new b/copyx
62 > diff --git a/new b/copyx
63 > similarity index 100%
63 > similarity index 100%
64 > copy from new
64 > copy from new
65 > copy to copyx
65 > copy to copyx
66 > EOF
66 > EOF
67 applying patch from stdin
67 applying patch from stdin
68
68
69 $ test -f copy
69 $ test -f copy
70 #if execbit
70 #if execbit
71 $ test ! -x copy
71 $ test ! -x copy
72 $ test -x copyx
72 $ test -x copyx
73 $ hg tip -q
73 $ hg tip -q
74 2:21dfaae65c71
74 2:21dfaae65c71
75 #else
75 #else
76 $ hg tip -q
76 $ hg tip -q
77 2:0efdaa8e3bf3
77 2:0efdaa8e3bf3
78 #endif
78 #endif
79
79
80 $ hg up -qCr1
80 $ hg up -qCr1
81 $ hg rollback -q
81 $ hg rollback -q
82
82
83 Copy (like above but independent of execbit):
83 Copy (like above but independent of execbit):
84
84
85 $ hg import -d "1000000 0" -mcopy - <<EOF
85 $ hg import -d "1000000 0" -mcopy - <<EOF
86 > diff --git a/new b/copy
86 > diff --git a/new b/copy
87 > similarity index 100%
87 > similarity index 100%
88 > copy from new
88 > copy from new
89 > copy to copy
89 > copy to copy
90 > diff --git a/new b/copyx
90 > diff --git a/new b/copyx
91 > similarity index 100%
91 > similarity index 100%
92 > copy from new
92 > copy from new
93 > copy to copyx
93 > copy to copyx
94 > EOF
94 > EOF
95 applying patch from stdin
95 applying patch from stdin
96
96
97 $ hg tip -q
97 $ hg tip -q
98 2:0efdaa8e3bf3
98 2:0efdaa8e3bf3
99 $ test -f copy
99 $ test -f copy
100
100
101 $ cat copy
101 $ cat copy
102 a
102 a
103
103
104 $ hg cat copy
104 $ hg cat copy
105 a
105 a
106
106
107 Rename:
107 Rename:
108
108
109 $ hg import -d "1000000 0" -mrename - <<EOF
109 $ hg import -d "1000000 0" -mrename - <<EOF
110 > diff --git a/copy b/rename
110 > diff --git a/copy b/rename
111 > similarity index 100%
111 > similarity index 100%
112 > rename from copy
112 > rename from copy
113 > rename to rename
113 > rename to rename
114 > EOF
114 > EOF
115 applying patch from stdin
115 applying patch from stdin
116
116
117 $ hg tip -q
117 $ hg tip -q
118 3:b1f57753fad2
118 3:b1f57753fad2
119
119
120 $ hg locate
120 $ hg locate
121 copyx
121 copyx
122 empty
122 empty
123 new
123 new
124 rename
124 rename
125
125
126 Delete:
126 Delete:
127
127
128 $ hg import -d "1000000 0" -mdelete - <<EOF
128 $ hg import -d "1000000 0" -mdelete - <<EOF
129 > diff --git a/copyx b/copyx
129 > diff --git a/copyx b/copyx
130 > deleted file mode 100755
130 > deleted file mode 100755
131 > index 7898192..0000000
131 > index 7898192..0000000
132 > --- a/copyx
132 > --- a/copyx
133 > +++ /dev/null
133 > +++ /dev/null
134 > @@ -1 +0,0 @@
134 > @@ -1 +0,0 @@
135 > -a
135 > -a
136 > EOF
136 > EOF
137 applying patch from stdin
137 applying patch from stdin
138
138
139 $ hg tip -q
139 $ hg tip -q
140 4:1bd1da94b9b2
140 4:1bd1da94b9b2
141
141
142 $ hg locate
142 $ hg locate
143 empty
143 empty
144 new
144 new
145 rename
145 rename
146
146
147 $ test -f copyx
147 $ test -f copyx
148 [1]
148 [1]
149
149
150 Regular diff:
150 Regular diff:
151
151
152 $ hg import -d "1000000 0" -mregular - <<EOF
152 $ hg import -d "1000000 0" -mregular - <<EOF
153 > diff --git a/rename b/rename
153 > diff --git a/rename b/rename
154 > index 7898192..72e1fe3 100644
154 > index 7898192..72e1fe3 100644
155 > --- a/rename
155 > --- a/rename
156 > +++ b/rename
156 > +++ b/rename
157 > @@ -1 +1,5 @@
157 > @@ -1 +1,5 @@
158 > a
158 > a
159 > +a
159 > +a
160 > +a
160 > +a
161 > +a
161 > +a
162 > +a
162 > +a
163 > EOF
163 > EOF
164 applying patch from stdin
164 applying patch from stdin
165
165
166 $ hg tip -q
166 $ hg tip -q
167 5:46fe99cb3035
167 5:46fe99cb3035
168
168
169 Copy and modify:
169 Copy and modify:
170
170
171 $ hg import -d "1000000 0" -mcopymod - <<EOF
171 $ hg import -d "1000000 0" -mcopymod - <<EOF
172 > diff --git a/rename b/copy2
172 > diff --git a/rename b/copy2
173 > similarity index 80%
173 > similarity index 80%
174 > copy from rename
174 > copy from rename
175 > copy to copy2
175 > copy to copy2
176 > index 72e1fe3..b53c148 100644
176 > index 72e1fe3..b53c148 100644
177 > --- a/rename
177 > --- a/rename
178 > +++ b/copy2
178 > +++ b/copy2
179 > @@ -1,5 +1,5 @@
179 > @@ -1,5 +1,5 @@
180 > a
180 > a
181 > a
181 > a
182 > -a
182 > -a
183 > +b
183 > +b
184 > a
184 > a
185 > a
185 > a
186 > EOF
186 > EOF
187 applying patch from stdin
187 applying patch from stdin
188
188
189 $ hg tip -q
189 $ hg tip -q
190 6:ffeb3197c12d
190 6:ffeb3197c12d
191
191
192 $ hg cat copy2
192 $ hg cat copy2
193 a
193 a
194 a
194 a
195 b
195 b
196 a
196 a
197 a
197 a
198
198
199 Rename and modify:
199 Rename and modify:
200
200
201 $ hg import -d "1000000 0" -mrenamemod - <<EOF
201 $ hg import -d "1000000 0" -mrenamemod - <<EOF
202 > diff --git a/copy2 b/rename2
202 > diff --git a/copy2 b/rename2
203 > similarity index 80%
203 > similarity index 80%
204 > rename from copy2
204 > rename from copy2
205 > rename to rename2
205 > rename to rename2
206 > index b53c148..8f81e29 100644
206 > index b53c148..8f81e29 100644
207 > --- a/copy2
207 > --- a/copy2
208 > +++ b/rename2
208 > +++ b/rename2
209 > @@ -1,5 +1,5 @@
209 > @@ -1,5 +1,5 @@
210 > a
210 > a
211 > a
211 > a
212 > b
212 > b
213 > -a
213 > -a
214 > +c
214 > +c
215 > a
215 > a
216 > EOF
216 > EOF
217 applying patch from stdin
217 applying patch from stdin
218
218
219 $ hg tip -q
219 $ hg tip -q
220 7:401aede9e6bb
220 7:401aede9e6bb
221
221
222 $ hg locate copy2
222 $ hg locate copy2
223 [1]
223 [1]
224 $ hg cat rename2
224 $ hg cat rename2
225 a
225 a
226 a
226 a
227 b
227 b
228 c
228 c
229 a
229 a
230
230
231 One file renamed multiple times:
231 One file renamed multiple times:
232
232
233 $ hg import -d "1000000 0" -mmultirenames - <<EOF
233 $ hg import -d "1000000 0" -mmultirenames - <<EOF
234 > diff --git a/rename2 b/rename3
234 > diff --git a/rename2 b/rename3
235 > rename from rename2
235 > rename from rename2
236 > rename to rename3
236 > rename to rename3
237 > diff --git a/rename2 b/rename3-2
237 > diff --git a/rename2 b/rename3-2
238 > rename from rename2
238 > rename from rename2
239 > rename to rename3-2
239 > rename to rename3-2
240 > EOF
240 > EOF
241 applying patch from stdin
241 applying patch from stdin
242
242
243 $ hg tip -q
243 $ hg tip -q
244 8:2ef727e684e8
244 8:2ef727e684e8
245
245
246 $ hg log -vr. --template '{rev} {files} / {file_copies}\n'
246 $ hg log -vr. --template '{rev} {files} / {file_copies}\n'
247 8 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
247 8 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
248
248
249 $ hg locate rename2 rename3 rename3-2
249 $ hg locate rename2 rename3 rename3-2
250 rename3
250 rename3
251 rename3-2
251 rename3-2
252
252
253 $ hg cat rename3
253 $ hg cat rename3
254 a
254 a
255 a
255 a
256 b
256 b
257 c
257 c
258 a
258 a
259
259
260 $ hg cat rename3-2
260 $ hg cat rename3-2
261 a
261 a
262 a
262 a
263 b
263 b
264 c
264 c
265 a
265 a
266
266
267 $ echo foo > foo
267 $ echo foo > foo
268 $ hg add foo
268 $ hg add foo
269 $ hg ci -m 'add foo'
269 $ hg ci -m 'add foo'
270
270
271 Binary files and regular patch hunks:
271 Binary files and regular patch hunks:
272
272
273 $ hg import -d "1000000 0" -m binaryregular - <<EOF
273 $ hg import -d "1000000 0" -m binaryregular - <<EOF
274 > diff --git a/binary b/binary
274 > diff --git a/binary b/binary
275 > new file mode 100644
275 > new file mode 100644
276 > index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
276 > index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
277 > GIT binary patch
277 > GIT binary patch
278 > literal 4
278 > literal 4
279 > Lc\${NkU|;|M00aO5
279 > Lc\${NkU|;|M00aO5
280 >
280 >
281 > diff --git a/foo b/foo2
281 > diff --git a/foo b/foo2
282 > rename from foo
282 > rename from foo
283 > rename to foo2
283 > rename to foo2
284 > EOF
284 > EOF
285 applying patch from stdin
285 applying patch from stdin
286
286
287 $ hg tip -q
287 $ hg tip -q
288 10:27377172366e
288 10:27377172366e
289
289
290 $ cat foo2
290 $ cat foo2
291 foo
291 foo
292
292
293 $ hg manifest --debug | grep binary
293 $ hg manifest --debug | grep binary
294 045c85ba38952325e126c70962cc0f9d9077bc67 644 binary
294 045c85ba38952325e126c70962cc0f9d9077bc67 644 binary
295
295
296 Multiple binary files:
296 Multiple binary files:
297
297
298 $ hg import -d "1000000 0" -m multibinary - <<EOF
298 $ hg import -d "1000000 0" -m multibinary - <<EOF
299 > diff --git a/mbinary1 b/mbinary1
299 > diff --git a/mbinary1 b/mbinary1
300 > new file mode 100644
300 > new file mode 100644
301 > index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
301 > index 0000000000000000000000000000000000000000..593f4708db84ac8fd0f5cc47c634f38c013fe9e4
302 > GIT binary patch
302 > GIT binary patch
303 > literal 4
303 > literal 4
304 > Lc\${NkU|;|M00aO5
304 > Lc\${NkU|;|M00aO5
305 >
305 >
306 > diff --git a/mbinary2 b/mbinary2
306 > diff --git a/mbinary2 b/mbinary2
307 > new file mode 100644
307 > new file mode 100644
308 > index 0000000000000000000000000000000000000000..112363ac1917b417ffbd7f376ca786a1e5fa7490
308 > index 0000000000000000000000000000000000000000..112363ac1917b417ffbd7f376ca786a1e5fa7490
309 > GIT binary patch
309 > GIT binary patch
310 > literal 5
310 > literal 5
311 > Mc\${NkU|\`?^000jF3jhEB
311 > Mc\${NkU|\`?^000jF3jhEB
312 >
312 >
313 > EOF
313 > EOF
314 applying patch from stdin
314 applying patch from stdin
315
315
316 $ hg tip -q
316 $ hg tip -q
317 11:18b73a84b4ab
317 11:18b73a84b4ab
318
318
319 $ hg manifest --debug | grep mbinary
319 $ hg manifest --debug | grep mbinary
320 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1
320 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1
321 a874b471193996e7cb034bb301cac7bdaf3e3f46 644 mbinary2
321 a874b471193996e7cb034bb301cac7bdaf3e3f46 644 mbinary2
322
322
323 Binary file and delta hunk:
323 Binary file and delta hunk (we build the patch using this sed hack to
324 avoid an unquoted ^, which check-code says breaks sh on solaris):
324
325
325 $ hg import -d "1000000 0" -m delta - <<'EOF'
326 $ sed 's/ caret /^/g;s/ dollarparen /$(/g' > quote-hack.patch <<'EOF'
326 > diff --git a/delta b/delta
327 > diff --git a/delta b/delta
327 > new file mode 100644
328 > new file mode 100644
328 > index 0000000000000000000000000000000000000000..8c9b7831b231c2600843e303e66b521353a200b3
329 > index 0000000000000000000000000000000000000000..8c9b7831b231c2600843e303e66b521353a200b3
329 > GIT binary patch
330 > GIT binary patch
330 > literal 3749
331 > literal 3749
331 > zcmV;W4qEYvP)<h;3K|Lk000e1NJLTq006iE002D*0ssI2kt{U(0000PbVXQnQ*UN;
332 > zcmV;W4qEYvP)<h;3K|Lk000e1NJLTq006iE002D*0ssI2kt{U(0000PbVXQnQ*UN;
332 > zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU=M@d9MRCwC#oC!>o#}>x{(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A3i)PDhh-pB_&1wGrDIl^*=8x3n&;akBf^-
399 > z#~**JC8hE4@n{hO&8btT5F*?nC_%LhA3i)PDhh-pB_&1wGrDIl caret *=8x3n&;akBf caret -
399 > zJd&86kq$%%907v^tgWoQdwI`|oNK%VvU~S#C<o^F?6c48?Cjj#-4P<>HFD%&|Ni~t
400 > zJd&86kq$%%907v caret tgWoQdwI`|oNK%VvU~S#C<o caret F?6c48?Cjj#-4P<>HFD%&|Ni~t
400 > zKJ(|#H`$<5W+6ZkBb213rXonKZLB+X>^L}J@W6osP3piLD_5?R!`S}*{xLBzFiL4@
401 > zKJ(|#H`$<5W+6ZkBb213rXonKZLB+X> caret L}J@W6osP3piLD_5?R!`S}*{xLBzFiL4@
401 > zX+}l{`A%?f@T5tT%ztu60p;)be`fWC`tP@WpO=?cpf8Xuf1OSj6d3f@Ki(ovDYq%0
402 > zX+}l{`A%?f@T5tT%ztu60p;)be`fWC`tP@WpO=?cpf8Xuf1OSj6d3f@Ki(ovDYq%0
402 > z{4ZSe`kOay5@=lAT!}vFzxyemC{sXDrhuYM0Y#ZI1r%ipD9W11{w=@&xgJ}t2x;ep
403 > z{4ZSe`kOay5@=lAT!}vFzxyemC{sXDrhuYM0Y#ZI1r%ipD9W11{w=@&xgJ}t2x;ep
403 > P00000NkvXXu0mjfZ5|Er
404 > P00000NkvXXu0mjfZ5|Er
404 >
405 >
405 > literal 0
406 > literal 0
406 > HcmV?d00001
407 > HcmV?d00001
407 >
408 >
408 > EOF
409 > EOF
409 applying patch from stdin
410 $ hg import -d "1000000 0" -m delta quote-hack.patch
411 applying quote-hack.patch
412 $ rm quote-hack.patch
410
413
411 $ hg manifest --debug | grep delta
414 $ hg manifest --debug | grep delta
412 9600f98bb60ce732634d126aaa4ac1ec959c573e 644 delta
415 9600f98bb60ce732634d126aaa4ac1ec959c573e 644 delta
413
416
414 $ hg import -d "1000000 0" -m delta - <<'EOF'
417 $ hg import -d "1000000 0" -m delta - <<'EOF'
415 > diff --git a/delta b/delta
418 > diff --git a/delta b/delta
416 > index 8c9b7831b231c2600843e303e66b521353a200b3..0021dd95bc0dba53c39ce81377126d43731d68df 100644
419 > index 8c9b7831b231c2600843e303e66b521353a200b3..0021dd95bc0dba53c39ce81377126d43731d68df 100644
417 > GIT binary patch
420 > GIT binary patch
418 > delta 49
421 > delta 49
419 > zcmZ1~yHs|=21Z8J$r~9bFdA-lVv=EEw4WT$qRf2QSa5SIOAHI6(&k4T8H|kLo4vWB
422 > zcmZ1~yHs|=21Z8J$r~9bFdA-lVv=EEw4WT$qRf2QSa5SIOAHI6(&k4T8H|kLo4vWB
420 > FSO9ZT4bA`n
423 > FSO9ZT4bA`n
421 >
424 >
422 > delta 49
425 > delta 49
423 > zcmV-10M7rV9i<(xumJ(}ld%Di0Xefm0vrMXpOaq%BLm9I%d>?9Tm%6Vv*HM70RcC&
426 > zcmV-10M7rV9i<(xumJ(}ld%Di0Xefm0vrMXpOaq%BLm9I%d>?9Tm%6Vv*HM70RcC&
424 > HOA1;9yU-AD
427 > HOA1;9yU-AD
425 >
428 >
426 > EOF
429 > EOF
427 applying patch from stdin
430 applying patch from stdin
428
431
429 $ hg manifest --debug | grep delta
432 $ hg manifest --debug | grep delta
430 56094bbea136dcf8dbd4088f6af469bde1a98b75 644 delta
433 56094bbea136dcf8dbd4088f6af469bde1a98b75 644 delta
431
434
432 Filenames with spaces:
435 Filenames with spaces:
433
436
434 $ sed 's,EOL$,,g' <<EOF | hg import -d "1000000 0" -m spaces -
437 $ sed 's,EOL$,,g' <<EOF | hg import -d "1000000 0" -m spaces -
435 > diff --git a/foo bar b/foo bar
438 > diff --git a/foo bar b/foo bar
436 > new file mode 100644
439 > new file mode 100644
437 > index 0000000..257cc56
440 > index 0000000..257cc56
438 > --- /dev/null
441 > --- /dev/null
439 > +++ b/foo bar EOL
442 > +++ b/foo bar EOL
440 > @@ -0,0 +1 @@
443 > @@ -0,0 +1 @@
441 > +foo
444 > +foo
442 > EOF
445 > EOF
443 applying patch from stdin
446 applying patch from stdin
444
447
445 $ hg tip -q
448 $ hg tip -q
446 14:4b79479c9a6d
449 14:4b79479c9a6d
447
450
448 $ cat "foo bar"
451 $ cat "foo bar"
449 foo
452 foo
450
453
451 Copy then modify the original file:
454 Copy then modify the original file:
452
455
453 $ hg import -d "1000000 0" -m copy-mod-orig - <<EOF
456 $ hg import -d "1000000 0" -m copy-mod-orig - <<EOF
454 > diff --git a/foo2 b/foo2
457 > diff --git a/foo2 b/foo2
455 > index 257cc56..fe08ec6 100644
458 > index 257cc56..fe08ec6 100644
456 > --- a/foo2
459 > --- a/foo2
457 > +++ b/foo2
460 > +++ b/foo2
458 > @@ -1 +1,2 @@
461 > @@ -1 +1,2 @@
459 > foo
462 > foo
460 > +new line
463 > +new line
461 > diff --git a/foo2 b/foo3
464 > diff --git a/foo2 b/foo3
462 > similarity index 100%
465 > similarity index 100%
463 > copy from foo2
466 > copy from foo2
464 > copy to foo3
467 > copy to foo3
465 > EOF
468 > EOF
466 applying patch from stdin
469 applying patch from stdin
467
470
468 $ hg tip -q
471 $ hg tip -q
469 15:9cbe44af4ae9
472 15:9cbe44af4ae9
470
473
471 $ cat foo3
474 $ cat foo3
472 foo
475 foo
473
476
474 Move text file and patch as binary
477 Move text file and patch as binary
475
478
476 $ echo a > text2
479 $ echo a > text2
477 $ hg ci -Am0
480 $ hg ci -Am0
478 adding text2
481 adding text2
479 $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
482 $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
480 > diff --git a/text2 b/binary2
483 > diff --git a/text2 b/binary2
481 > rename from text2
484 > rename from text2
482 > rename to binary2
485 > rename to binary2
483 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
486 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
484 > GIT binary patch
487 > GIT binary patch
485 > literal 5
488 > literal 5
486 > Mc$`b*O5$Pw00T?_*Z=?k
489 > Mc$`b*O5$Pw00T?_*Z=?k
487 >
490 >
488 > EOF
491 > EOF
489 applying patch from stdin
492 applying patch from stdin
490
493
491 $ cat binary2
494 $ cat binary2
492 a
495 a
493 b
496 b
494 \x00 (no-eol) (esc)
497 \x00 (no-eol) (esc)
495
498
496 $ hg st --copies --change .
499 $ hg st --copies --change .
497 A binary2
500 A binary2
498 text2
501 text2
499 R text2
502 R text2
500
503
501 Invalid base85 content
504 Invalid base85 content
502
505
503 $ hg rollback
506 $ hg rollback
504 repository tip rolled back to revision 16 (undo import)
507 repository tip rolled back to revision 16 (undo import)
505 working directory now based on revision 16
508 working directory now based on revision 16
506 $ hg revert -aq
509 $ hg revert -aq
507 $ hg import -d "1000000 0" -m invalid-binary - <<"EOF"
510 $ hg import -d "1000000 0" -m invalid-binary - <<"EOF"
508 > diff --git a/text2 b/binary2
511 > diff --git a/text2 b/binary2
509 > rename from text2
512 > rename from text2
510 > rename to binary2
513 > rename to binary2
511 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
514 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
512 > GIT binary patch
515 > GIT binary patch
513 > literal 5
516 > literal 5
514 > Mc$`b*O.$Pw00T?_*Z=?k
517 > Mc$`b*O.$Pw00T?_*Z=?k
515 >
518 >
516 > EOF
519 > EOF
517 applying patch from stdin
520 applying patch from stdin
518 abort: could not decode "binary2" binary patch: bad base85 character at position 6
521 abort: could not decode "binary2" binary patch: bad base85 character at position 6
519 [255]
522 [255]
520
523
521 $ hg revert -aq
524 $ hg revert -aq
522 $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
525 $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
523 > diff --git a/text2 b/binary2
526 > diff --git a/text2 b/binary2
524 > rename from text2
527 > rename from text2
525 > rename to binary2
528 > rename to binary2
526 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
529 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
527 > GIT binary patch
530 > GIT binary patch
528 > literal 6
531 > literal 6
529 > Mc$`b*O5$Pw00T?_*Z=?k
532 > Mc$`b*O5$Pw00T?_*Z=?k
530 >
533 >
531 > EOF
534 > EOF
532 applying patch from stdin
535 applying patch from stdin
533 abort: "binary2" length is 5 bytes, should be 6
536 abort: "binary2" length is 5 bytes, should be 6
534 [255]
537 [255]
535
538
536 $ hg revert -aq
539 $ hg revert -aq
537 $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
540 $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
538 > diff --git a/text2 b/binary2
541 > diff --git a/text2 b/binary2
539 > rename from text2
542 > rename from text2
540 > rename to binary2
543 > rename to binary2
541 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
544 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
542 > GIT binary patch
545 > GIT binary patch
543 > Mc$`b*O5$Pw00T?_*Z=?k
546 > Mc$`b*O5$Pw00T?_*Z=?k
544 >
547 >
545 > EOF
548 > EOF
546 applying patch from stdin
549 applying patch from stdin
547 abort: could not extract "binary2" binary data
550 abort: could not extract "binary2" binary data
548 [255]
551 [255]
549
552
550 Simulate a copy/paste turning LF into CRLF (issue2870)
553 Simulate a copy/paste turning LF into CRLF (issue2870)
551
554
552 $ hg revert -aq
555 $ hg revert -aq
553 $ cat > binary.diff <<"EOF"
556 $ cat > binary.diff <<"EOF"
554 > diff --git a/text2 b/binary2
557 > diff --git a/text2 b/binary2
555 > rename from text2
558 > rename from text2
556 > rename to binary2
559 > rename to binary2
557 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
560 > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
558 > GIT binary patch
561 > GIT binary patch
559 > literal 5
562 > literal 5
560 > Mc$`b*O5$Pw00T?_*Z=?k
563 > Mc$`b*O5$Pw00T?_*Z=?k
561 >
564 >
562 > EOF
565 > EOF
563 >>> fp = file('binary.diff', 'rb')
566 >>> fp = file('binary.diff', 'rb')
564 >>> data = fp.read()
567 >>> data = fp.read()
565 >>> fp.close()
568 >>> fp.close()
566 >>> file('binary.diff', 'wb').write(data.replace('\n', '\r\n'))
569 >>> file('binary.diff', 'wb').write(data.replace('\n', '\r\n'))
567 $ rm binary2
570 $ rm binary2
568 $ hg import --no-commit binary.diff
571 $ hg import --no-commit binary.diff
569 applying binary.diff
572 applying binary.diff
570
573
571 $ cd ..
574 $ cd ..
572
575
573 Consecutive import with renames (issue2459)
576 Consecutive import with renames (issue2459)
574
577
575 $ hg init issue2459
578 $ hg init issue2459
576 $ cd issue2459
579 $ cd issue2459
577 $ hg import --no-commit --force - <<EOF
580 $ hg import --no-commit --force - <<EOF
578 > diff --git a/a b/a
581 > diff --git a/a b/a
579 > new file mode 100644
582 > new file mode 100644
580 > EOF
583 > EOF
581 applying patch from stdin
584 applying patch from stdin
582 $ hg import --no-commit --force - <<EOF
585 $ hg import --no-commit --force - <<EOF
583 > diff --git a/a b/b
586 > diff --git a/a b/b
584 > rename from a
587 > rename from a
585 > rename to b
588 > rename to b
586 > EOF
589 > EOF
587 applying patch from stdin
590 applying patch from stdin
588 a has not been committed yet, so no copy data will be stored for b.
591 a has not been committed yet, so no copy data will be stored for b.
589 $ hg debugstate
592 $ hg debugstate
590 a 0 -1 unset b
593 a 0 -1 unset b
591 $ hg ci -m done
594 $ hg ci -m done
592 $ cd ..
595 $ cd ..
593
596
594 Renames and strip
597 Renames and strip
595
598
596 $ hg init renameandstrip
599 $ hg init renameandstrip
597 $ cd renameandstrip
600 $ cd renameandstrip
598 $ echo a > a
601 $ echo a > a
599 $ hg ci -Am adda
602 $ hg ci -Am adda
600 adding a
603 adding a
601 $ hg import --no-commit -p2 - <<EOF
604 $ hg import --no-commit -p2 - <<EOF
602 > diff --git a/foo/a b/foo/b
605 > diff --git a/foo/a b/foo/b
603 > rename from foo/a
606 > rename from foo/a
604 > rename to foo/b
607 > rename to foo/b
605 > EOF
608 > EOF
606 applying patch from stdin
609 applying patch from stdin
607 $ hg st --copies
610 $ hg st --copies
608 A b
611 A b
609 a
612 a
610 R a
613 R a
611
614
612 Renames, similarity and git diff
615 Renames, similarity and git diff
613
616
614 $ hg revert -aC
617 $ hg revert -aC
615 undeleting a
618 undeleting a
616 forgetting b
619 forgetting b
617 $ rm b
620 $ rm b
618 $ hg import --similarity 90 --no-commit - <<EOF
621 $ hg import --similarity 90 --no-commit - <<EOF
619 > diff --git a/a b/b
622 > diff --git a/a b/b
620 > rename from a
623 > rename from a
621 > rename to b
624 > rename to b
622 > EOF
625 > EOF
623 applying patch from stdin
626 applying patch from stdin
624 $ hg st --copies
627 $ hg st --copies
625 A b
628 A b
626 a
629 a
627 R a
630 R a
628 $ cd ..
631 $ cd ..
629
632
630 Pure copy with existing destination
633 Pure copy with existing destination
631
634
632 $ hg init copytoexisting
635 $ hg init copytoexisting
633 $ cd copytoexisting
636 $ cd copytoexisting
634 $ echo a > a
637 $ echo a > a
635 $ echo b > b
638 $ echo b > b
636 $ hg ci -Am add
639 $ hg ci -Am add
637 adding a
640 adding a
638 adding b
641 adding b
639 $ hg import --no-commit - <<EOF
642 $ hg import --no-commit - <<EOF
640 > diff --git a/a b/b
643 > diff --git a/a b/b
641 > copy from a
644 > copy from a
642 > copy to b
645 > copy to b
643 > EOF
646 > EOF
644 applying patch from stdin
647 applying patch from stdin
645 abort: cannot create b: destination already exists
648 abort: cannot create b: destination already exists
646 [255]
649 [255]
647 $ cat b
650 $ cat b
648 b
651 b
649
652
650 Copy and changes with existing destination
653 Copy and changes with existing destination
651
654
652 $ hg import --no-commit - <<EOF
655 $ hg import --no-commit - <<EOF
653 > diff --git a/a b/b
656 > diff --git a/a b/b
654 > copy from a
657 > copy from a
655 > copy to b
658 > copy to b
656 > --- a/a
659 > --- a/a
657 > +++ b/b
660 > +++ b/b
658 > @@ -1,1 +1,2 @@
661 > @@ -1,1 +1,2 @@
659 > a
662 > a
660 > +b
663 > +b
661 > EOF
664 > EOF
662 applying patch from stdin
665 applying patch from stdin
663 cannot create b: destination already exists
666 cannot create b: destination already exists
664 1 out of 1 hunks FAILED -- saving rejects to file b.rej
667 1 out of 1 hunks FAILED -- saving rejects to file b.rej
665 abort: patch failed to apply
668 abort: patch failed to apply
666 [255]
669 [255]
667 $ cat b
670 $ cat b
668 b
671 b
669
672
670 #if symlink
673 #if symlink
671
674
672 $ ln -s b linkb
675 $ ln -s b linkb
673 $ hg add linkb
676 $ hg add linkb
674 $ hg ci -m addlinkb
677 $ hg ci -m addlinkb
675 $ hg import --no-commit - <<EOF
678 $ hg import --no-commit - <<EOF
676 > diff --git a/linkb b/linkb
679 > diff --git a/linkb b/linkb
677 > deleted file mode 120000
680 > deleted file mode 120000
678 > --- a/linkb
681 > --- a/linkb
679 > +++ /dev/null
682 > +++ /dev/null
680 > @@ -1,1 +0,0 @@
683 > @@ -1,1 +0,0 @@
681 > -badhunk
684 > -badhunk
682 > \ No newline at end of file
685 > \ No newline at end of file
683 > EOF
686 > EOF
684 applying patch from stdin
687 applying patch from stdin
685 patching file linkb
688 patching file linkb
686 Hunk #1 FAILED at 0
689 Hunk #1 FAILED at 0
687 1 out of 1 hunks FAILED -- saving rejects to file linkb.rej
690 1 out of 1 hunks FAILED -- saving rejects to file linkb.rej
688 abort: patch failed to apply
691 abort: patch failed to apply
689 [255]
692 [255]
690 $ hg st
693 $ hg st
691 ? b.rej
694 ? b.rej
692 ? linkb.rej
695 ? linkb.rej
693
696
694 #endif
697 #endif
695
698
696 Test corner case involving copies and multiple hunks (issue3384)
699 Test corner case involving copies and multiple hunks (issue3384)
697
700
698 $ hg revert -qa
701 $ hg revert -qa
699 $ hg import --no-commit - <<EOF
702 $ hg import --no-commit - <<EOF
700 > diff --git a/a b/c
703 > diff --git a/a b/c
701 > copy from a
704 > copy from a
702 > copy to c
705 > copy to c
703 > --- a/a
706 > --- a/a
704 > +++ b/c
707 > +++ b/c
705 > @@ -1,1 +1,2 @@
708 > @@ -1,1 +1,2 @@
706 > a
709 > a
707 > +a
710 > +a
708 > @@ -2,1 +2,2 @@
711 > @@ -2,1 +2,2 @@
709 > a
712 > a
710 > +a
713 > +a
711 > diff --git a/a b/a
714 > diff --git a/a b/a
712 > --- a/a
715 > --- a/a
713 > +++ b/a
716 > +++ b/a
714 > @@ -1,1 +1,2 @@
717 > @@ -1,1 +1,2 @@
715 > a
718 > a
716 > +b
719 > +b
717 > EOF
720 > EOF
718 applying patch from stdin
721 applying patch from stdin
719
722
720 $ cd ..
723 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now