Show More
@@ -1,6 +1,5 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink || exit 80 |
|
1 | $ hg init repo | |
2 |
|
2 | $ cd repo | ||
3 | $ hg init |
|
|||
4 |
|
3 | |||
5 | New file: |
|
4 | New file: | |
6 |
|
5 | |||
@@ -41,14 +40,19 b' chmod +x:' | |||||
41 | > EOF |
|
40 | > EOF | |
42 | applying patch from stdin |
|
41 | applying patch from stdin | |
43 |
|
42 | |||
|
43 | #if execbit | |||
44 | $ hg tip -q |
|
44 | $ hg tip -q | |
45 | 2:3a34410f282e |
|
45 | 2:3a34410f282e | |
46 |
|
||||
47 | $ test -x new |
|
46 | $ test -x new | |
|
47 | $ hg rollback -q | |||
|
48 | #else | |||
|
49 | $ hg tip -q | |||
|
50 | 1:ab199dc869b5 | |||
|
51 | #endif | |||
48 |
|
52 | |||
49 | Copy: |
|
53 | Copy and removing x bit: | |
50 |
|
54 | |||
51 | $ hg import -d "1000000 0" -mcopy - <<EOF |
|
55 | $ hg import -f -d "1000000 0" -mcopy - <<EOF | |
52 | > diff --git a/new b/copy |
|
56 | > diff --git a/new b/copy | |
53 | > old mode 100755 |
|
57 | > old mode 100755 | |
54 | > new mode 100644 |
|
58 | > new mode 100644 | |
@@ -62,16 +66,37 b' Copy:' | |||||
62 | > EOF |
|
66 | > EOF | |
63 | applying patch from stdin |
|
67 | applying patch from stdin | |
64 |
|
68 | |||
65 | $ hg tip -q |
|
69 | $ test -f copy | |
66 | 3:37bacb7ca14d |
|
|||
67 |
|
||||
68 | #if execbit |
|
70 | #if execbit | |
69 | $ test -f copy |
|
|||
70 | $ test ! -x copy |
|
71 | $ test ! -x copy | |
71 | $ test -x copyx |
|
72 | $ test -x copyx | |
|
73 | $ hg tip -q | |||
|
74 | 2:21dfaae65c71 | |||
72 | #else |
|
75 | #else | |
|
76 | $ hg tip -q | |||
|
77 | 2:0efdaa8e3bf3 | |||
|
78 | #endif | |||
|
79 | ||||
|
80 | $ hg up -qCr1 | |||
|
81 | $ hg rollback -q | |||
|
82 | ||||
|
83 | Copy (like above but independent of execbit): | |||
|
84 | ||||
|
85 | $ hg import -d "1000000 0" -mcopy - <<EOF | |||
|
86 | > diff --git a/new b/copy | |||
|
87 | > similarity index 100% | |||
|
88 | > copy from new | |||
|
89 | > copy to copy | |||
|
90 | > diff --git a/new b/copyx | |||
|
91 | > similarity index 100% | |||
|
92 | > copy from new | |||
|
93 | > copy to copyx | |||
|
94 | > EOF | |||
|
95 | applying patch from stdin | |||
|
96 | ||||
|
97 | $ hg tip -q | |||
|
98 | 2:0efdaa8e3bf3 | |||
73 | $ test -f copy |
|
99 | $ test -f copy | |
74 | #endif |
|
|||
75 |
|
|
100 | ||
76 | $ cat copy |
|
101 | $ cat copy | |
77 | a |
|
102 | a | |
@@ -90,7 +115,7 b' Rename:' | |||||
90 | applying patch from stdin |
|
115 | applying patch from stdin | |
91 |
|
116 | |||
92 | $ hg tip -q |
|
117 | $ hg tip -q | |
93 | 4:47b81a94361d |
|
118 | 3:b1f57753fad2 | |
94 |
|
119 | |||
95 | $ hg locate |
|
120 | $ hg locate | |
96 | copyx |
|
121 | copyx | |
@@ -112,7 +137,7 b' Delete:' | |||||
112 | applying patch from stdin |
|
137 | applying patch from stdin | |
113 |
|
138 | |||
114 | $ hg tip -q |
|
139 | $ hg tip -q | |
115 | 5:d9b001d98336 |
|
140 | 4:1bd1da94b9b2 | |
116 |
|
141 | |||
117 |
$ |
|
142 | $ hg locate | |
118 | empty |
|
143 | empty | |
@@ -139,7 +164,7 b' Regular diff:' | |||||
139 | applying patch from stdin |
|
164 | applying patch from stdin | |
140 |
|
165 | |||
141 | $ hg tip -q |
|
166 | $ hg tip -q | |
142 | 6:ebe901e7576b |
|
167 | 5:46fe99cb3035 | |
143 |
|
168 | |||
144 | Copy and modify: |
|
169 | Copy and modify: | |
145 |
|
170 | |||
@@ -162,7 +187,7 b' Copy and modify:' | |||||
162 | applying patch from stdin |
|
187 | applying patch from stdin | |
163 |
|
188 | |||
164 | $ hg tip -q |
|
189 | $ hg tip -q | |
165 | 7:18f368958ecd |
|
190 | 6:ffeb3197c12d | |
166 |
|
191 | |||
167 | $ hg cat copy2 |
|
192 | $ hg cat copy2 | |
168 | a |
|
193 | a | |
@@ -192,7 +217,7 b' Rename and modify:' | |||||
192 | applying patch from stdin |
|
217 | applying patch from stdin | |
193 |
|
218 | |||
194 | $ hg tip -q |
|
219 | $ hg tip -q | |
195 | 8:c32b0d7e6f44 |
|
220 | 7:401aede9e6bb | |
196 |
|
221 | |||
197 |
$ |
|
222 | $ hg locate copy2 | |
198 | [1] |
|
223 | [1] | |
@@ -216,10 +241,10 b' One file renamed multiple times:' | |||||
216 | applying patch from stdin |
|
241 | applying patch from stdin | |
217 |
|
242 | |||
218 | $ hg tip -q |
|
243 | $ hg tip -q | |
219 | 9:034a6bf95330 |
|
244 | 8:2ef727e684e8 | |
220 |
|
245 | |||
221 | $ hg log -vr. --template '{rev} {files} / {file_copies}\n' |
|
246 | $ hg log -vr. --template '{rev} {files} / {file_copies}\n' | |
222 |
|
|
247 | 8 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2) | |
223 |
|
248 | |||
224 | $ hg locate rename2 rename3 rename3-2 |
|
249 | $ hg locate rename2 rename3 rename3-2 | |
225 | rename3 |
|
250 | rename3 | |
@@ -260,7 +285,7 b' Binary files and regular patch hunks:' | |||||
260 | applying patch from stdin |
|
285 | applying patch from stdin | |
261 |
|
286 | |||
262 | $ hg tip -q |
|
287 | $ hg tip -q | |
263 | 11:c39bce63e786 |
|
288 | 10:27377172366e | |
264 |
|
289 | |||
265 |
$ |
|
290 | $ cat foo2 | |
266 | foo |
|
291 | foo | |
@@ -289,7 +314,7 b' Multiple binary files:' | |||||
289 | applying patch from stdin |
|
314 | applying patch from stdin | |
290 |
|
315 | |||
291 | $ hg tip -q |
|
316 | $ hg tip -q | |
292 | 12:30b530085242 |
|
317 | 11:18b73a84b4ab | |
293 |
|
318 | |||
294 | $ hg manifest --debug | grep mbinary |
|
319 | $ hg manifest --debug | grep mbinary | |
295 | 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1 |
|
320 | 045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1 | |
@@ -309,7 +334,7 b' Filenames with spaces:' | |||||
309 | applying patch from stdin |
|
334 | applying patch from stdin | |
310 |
|
335 | |||
311 | $ hg tip -q |
|
336 | $ hg tip -q | |
312 | 13:04750ef42fb3 |
|
337 | 12:47500ce1614e | |
313 |
|
338 | |||
314 | $ cat "foo bar" |
|
339 | $ cat "foo bar" | |
315 | foo |
|
340 | foo | |
@@ -332,7 +357,7 b' Copy then modify the original file:' | |||||
332 | applying patch from stdin |
|
357 | applying patch from stdin | |
333 |
|
358 | |||
334 | $ hg tip -q |
|
359 | $ hg tip -q | |
335 | 14:c4cd9cdeaa74 |
|
360 | 13:6757efb07ea9 | |
336 |
|
361 | |||
337 |
$ |
|
362 | $ cat foo3 | |
338 | foo |
|
363 | foo | |
@@ -367,8 +392,8 b' Move text file and patch as binary' | |||||
367 | Invalid base85 content |
|
392 | Invalid base85 content | |
368 |
|
393 | |||
369 | $ hg rollback |
|
394 | $ hg rollback | |
370 |
repository tip rolled back to revision 1 |
|
395 | repository tip rolled back to revision 14 (undo import) | |
371 |
working directory now based on revision 1 |
|
396 | working directory now based on revision 14 | |
372 | $ hg revert -aq |
|
397 | $ hg revert -aq | |
373 | $ hg import -d "1000000 0" -m invalid-binary - <<"EOF" |
|
398 | $ hg import -d "1000000 0" -m invalid-binary - <<"EOF" | |
374 | > diff --git a/text2 b/binary2 |
|
399 | > diff --git a/text2 b/binary2 | |
@@ -533,6 +558,8 b' Copy and changes with existing destinati' | |||||
533 | $ cat b |
|
558 | $ cat b | |
534 | b |
|
559 | b | |
535 |
|
560 | |||
|
561 | #if symlink | |||
|
562 | ||||
536 | $ ln -s b linkb |
|
563 | $ ln -s b linkb | |
537 | $ hg add linkb |
|
564 | $ hg add linkb | |
538 | $ hg ci -m addlinkb |
|
565 | $ hg ci -m addlinkb | |
@@ -555,6 +582,8 b' Copy and changes with existing destinati' | |||||
555 | ? b.rej |
|
582 | ? b.rej | |
556 | ? linkb.rej |
|
583 | ? linkb.rej | |
557 |
|
584 | |||
|
585 | #endif | |||
|
586 | ||||
558 | Test corner case involving copies and multiple hunks (issue3384) |
|
587 | Test corner case involving copies and multiple hunks (issue3384) | |
559 |
|
588 | |||
560 | $ hg revert -qa |
|
589 | $ hg revert -qa |
General Comments 0
You need to be logged in to leave comments.
Login now