comparison tests/test-record.t @ 12074:35c143e85b1b

tests: unify test-record
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 27 Aug 2010 16:25:47 +0200
parents tests/test-record@a5922547b5cc
children 4134686b83e1
comparison
equal deleted inserted replaced
12073:adfff89e6058 12074:35c143e85b1b
1 #!/bin/sh
2
3 $ echo "[ui]" >> $HGRCPATH
4 $ echo "interactive=true" >> $HGRCPATH
5 $ echo "[extensions]" >> $HGRCPATH
6 $ echo "record=" >> $HGRCPATH
7
8 Help
9
10 $ hg help record
11 hg record [OPTION]... [FILE]...
12
13 interactively select changes to commit
14
15 If a list of files is omitted, all changes reported by "hg status" will be
16 candidates for recording.
17
18 See "hg help dates" for a list of formats valid for -d/--date.
19
20 You will be prompted for whether to record changes to each modified file,
21 and for files with multiple changes, for each change to use. For each
22 query, the following responses are possible:
23
24 y - record this change
25 n - skip this change
26
27 s - skip remaining changes to this file
28 f - record remaining changes to this file
29
30 d - done, skip remaining changes and files
31 a - record all changes to all remaining files
32 q - quit, recording no changes
33
34 ? - display help
35
36 This command is not available when committing a merge.
37
38 options:
39
40 -A --addremove mark new/missing files as added/removed before
41 committing
42 --close-branch mark a branch as closed, hiding it from the branch
43 list
44 -I --include PATTERN [+] include names matching the given patterns
45 -X --exclude PATTERN [+] exclude names matching the given patterns
46 -m --message TEXT use text as commit message
47 -l --logfile FILE read commit message from file
48 -d --date DATE record datecode as commit date
49 -u --user USER record the specified user as committer
50
51 [+] marked option can be specified multiple times
52
53 use "hg -v help record" to show global options
54
55 $ hg init a
56 $ cd a
57
58 Select no files
59
60 $ touch empty-rw
61 $ hg add empty-rw
62
63 $ hg record empty-rw<<EOF
64 > n
65 > EOF
66 diff --git a/empty-rw b/empty-rw
67 new file mode 100644
68 examine changes to 'empty-rw'? [Ynsfdaq?]
69 no changes to record
70
71 $ hg tip -p
72 changeset: -1:000000000000
73 tag: tip
74 user:
75 date: Thu Jan 01 00:00:00 1970 +0000
76
77
78
79 Select files but no hunks
80
81 $ hg record empty-rw<<EOF
82 > y
83 > n
84 > EOF
85 diff --git a/empty-rw b/empty-rw
86 new file mode 100644
87 examine changes to 'empty-rw'? [Ynsfdaq?]
88 abort: empty commit message
89
90 $ hg tip -p
91 changeset: -1:000000000000
92 tag: tip
93 user:
94 date: Thu Jan 01 00:00:00 1970 +0000
95
96
97
98 Record empty file
99
100 $ hg record -d '0 0' -m empty empty-rw<<EOF
101 > y
102 > y
103 > EOF
104 diff --git a/empty-rw b/empty-rw
105 new file mode 100644
106 examine changes to 'empty-rw'? [Ynsfdaq?]
107
108 $ hg tip -p
109 changeset: 0:c0708cf4e46e
110 tag: tip
111 user: test
112 date: Thu Jan 01 00:00:00 1970 +0000
113 summary: empty
114
115
116
117 Summary shows we updated to the new cset
118
119 $ hg summary
120 parent: 0:c0708cf4e46e tip
121 empty
122 branch: default
123 commit: (clean)
124 update: (current)
125
126 Rename empty file
127
128 $ hg mv empty-rw empty-rename
129 $ hg record -d '1 0' -m rename<<EOF
130 > y
131 > EOF
132 diff --git a/empty-rw b/empty-rename
133 rename from empty-rw
134 rename to empty-rename
135 examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?]
136
137 $ hg tip -p
138 changeset: 1:d695e8dcb197
139 tag: tip
140 user: test
141 date: Thu Jan 01 00:00:01 1970 +0000
142 summary: rename
143
144
145
146 Copy empty file
147
148 $ hg cp empty-rename empty-copy
149 $ hg record -d '2 0' -m copy<<EOF
150 > y
151 > EOF
152 diff --git a/empty-rename b/empty-copy
153 copy from empty-rename
154 copy to empty-copy
155 examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?]
156
157 $ hg tip -p
158 changeset: 2:1d4b90bea524
159 tag: tip
160 user: test
161 date: Thu Jan 01 00:00:02 1970 +0000
162 summary: copy
163
164
165
166 Delete empty file
167
168 $ hg rm empty-copy
169 $ hg record -d '3 0' -m delete<<EOF
170 > y
171 > EOF
172 diff --git a/empty-copy b/empty-copy
173 deleted file mode 100644
174 examine changes to 'empty-copy'? [Ynsfdaq?]
175
176 $ hg tip -p
177 changeset: 3:b39a238f01a1
178 tag: tip
179 user: test
180 date: Thu Jan 01 00:00:03 1970 +0000
181 summary: delete
182
183
184
185 Add binary file
186
187 $ hg bundle --base -2 tip.bundle
188 1 changesets found
189 $ hg add tip.bundle
190 $ hg record -d '4 0' -m binary<<EOF
191 > y
192 > EOF
193 diff --git a/tip.bundle b/tip.bundle
194 new file mode 100644
195 this is a binary file
196 examine changes to 'tip.bundle'? [Ynsfdaq?]
197
198 $ hg tip -p
199 changeset: 4:ad816da3711e
200 tag: tip
201 user: test
202 date: Thu Jan 01 00:00:04 1970 +0000
203 summary: binary
204
205 diff -r b39a238f01a1 -r ad816da3711e tip.bundle
206 Binary file tip.bundle has changed
207
208
209 Change binary file
210
211 $ hg bundle --base -2 tip.bundle
212 1 changesets found
213 $ hg record -d '5 0' -m binary-change<<EOF
214 > y
215 > EOF
216 diff --git a/tip.bundle b/tip.bundle
217 this modifies a binary file (all or nothing)
218 examine changes to 'tip.bundle'? [Ynsfdaq?]
219
220 $ hg tip -p
221 changeset: 5:dccd6f3eb485
222 tag: tip
223 user: test
224 date: Thu Jan 01 00:00:05 1970 +0000
225 summary: binary-change
226
227 diff -r ad816da3711e -r dccd6f3eb485 tip.bundle
228 Binary file tip.bundle has changed
229
230
231 Rename and change binary file
232
233 $ hg mv tip.bundle top.bundle
234 $ hg bundle --base -2 top.bundle
235 1 changesets found
236 $ hg record -d '6 0' -m binary-change-rename<<EOF
237 > y
238 > EOF
239 diff --git a/tip.bundle b/top.bundle
240 rename from tip.bundle
241 rename to top.bundle
242 this modifies a binary file (all or nothing)
243 examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?]
244
245 $ hg tip -p
246 changeset: 6:7fa44105f5b3
247 tag: tip
248 user: test
249 date: Thu Jan 01 00:00:06 1970 +0000
250 summary: binary-change-rename
251
252 diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle
253 Binary file tip.bundle has changed
254 diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle
255 Binary file top.bundle has changed
256
257
258 Add plain file
259
260 $ for i in 1 2 3 4 5 6 7 8 9 10; do
261 > echo $i >> plain
262 > done
263
264 $ hg add plain
265 $ hg record -d '7 0' -m plain plain<<EOF
266 > y
267 > y
268 > EOF
269 diff --git a/plain b/plain
270 new file mode 100644
271 examine changes to 'plain'? [Ynsfdaq?]
272
273 $ hg tip -p
274 changeset: 7:11fb457c1be4
275 tag: tip
276 user: test
277 date: Thu Jan 01 00:00:07 1970 +0000
278 summary: plain
279
280 diff -r 7fa44105f5b3 -r 11fb457c1be4 plain
281 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
282 +++ b/plain Thu Jan 01 00:00:07 1970 +0000
283 @@ -0,0 +1,10 @@
284 +1
285 +2
286 +3
287 +4
288 +5
289 +6
290 +7
291 +8
292 +9
293 +10
294
295
296 Modify end of plain file
297
298 $ echo 11 >> plain
299 $ hg record -d '8 0' -m end plain <<EOF
300 > y
301 > y
302 > EOF
303 diff --git a/plain b/plain
304 1 hunks, 1 lines changed
305 examine changes to 'plain'? [Ynsfdaq?]
306 @@ -8,3 +8,4 @@
307 8
308 9
309 10
310 +11
311 record this change to 'plain'? [Ynsfdaq?]
312
313 Modify end of plain file, no EOL
314
315 $ hg tip --template '{node}' >> plain
316 $ hg record -d '9 0' -m noeol plain <<EOF
317 > y
318 > y
319 > EOF
320 diff --git a/plain b/plain
321 1 hunks, 1 lines changed
322 examine changes to 'plain'? [Ynsfdaq?]
323 @@ -9,3 +9,4 @@
324 9
325 10
326 11
327 +7264f99c5f5ff3261504828afa4fb4d406c3af54
328 \ No newline at end of file
329 record this change to 'plain'? [Ynsfdaq?]
330
331 Modify end of plain file, add EOL
332
333 $ echo >> plain
334 $ hg record -d '10 0' -m eol plain <<EOF
335 > y
336 > y
337 > y
338 > EOF
339 diff --git a/plain b/plain
340 1 hunks, 1 lines changed
341 examine changes to 'plain'? [Ynsfdaq?]
342 @@ -9,4 +9,4 @@
343 9
344 10
345 11
346 -7264f99c5f5ff3261504828afa4fb4d406c3af54
347 \ No newline at end of file
348 +7264f99c5f5ff3261504828afa4fb4d406c3af54
349 record this change to 'plain'? [Ynsfdaq?]
350
351 Modify beginning, trim end, record both
352
353 $ rm plain
354 $ for i in 2 2 3 4 5 6 7 8 9 10; do
355 > echo $i >> plain
356 > done
357
358 $ hg record -d '10 0' -m begin-and-end plain <<EOF
359 > y
360 > y
361 > y
362 > EOF
363 diff --git a/plain b/plain
364 2 hunks, 3 lines changed
365 examine changes to 'plain'? [Ynsfdaq?]
366 @@ -1,4 +1,4 @@
367 -1
368 +2
369 2
370 3
371 4
372 record change 1/2 to 'plain'? [Ynsfdaq?]
373 @@ -8,5 +8,3 @@
374 8
375 9
376 10
377 -11
378 -7264f99c5f5ff3261504828afa4fb4d406c3af54
379 record change 2/2 to 'plain'? [Ynsfdaq?]
380
381 $ hg tip -p
382 changeset: 11:efca65c9b09e
383 tag: tip
384 user: test
385 date: Thu Jan 01 00:00:10 1970 +0000
386 summary: begin-and-end
387
388 diff -r cd07d48e8cbe -r efca65c9b09e plain
389 --- a/plain Thu Jan 01 00:00:10 1970 +0000
390 +++ b/plain Thu Jan 01 00:00:10 1970 +0000
391 @@ -1,4 +1,4 @@
392 -1
393 +2
394 2
395 3
396 4
397 @@ -8,5 +8,3 @@
398 8
399 9
400 10
401 -11
402 -7264f99c5f5ff3261504828afa4fb4d406c3af54
403
404
405 Trim beginning, modify end
406
407 $ rm plain
408 > for i in 4 5 6 7 8 9 10.new; do
409 > echo $i >> plain
410 > done
411
412 Record end
413
414 $ hg record -d '11 0' -m end-only plain <<EOF
415 > y
416 > n
417 > y
418 > EOF
419 diff --git a/plain b/plain
420 2 hunks, 4 lines changed
421 examine changes to 'plain'? [Ynsfdaq?]
422 @@ -1,9 +1,6 @@
423 -2
424 -2
425 -3
426 4
427 5
428 6
429 7
430 8
431 9
432 record change 1/2 to 'plain'? [Ynsfdaq?]
433 @@ -4,7 +1,7 @@
434 4
435 5
436 6
437 7
438 8
439 9
440 -10
441 +10.new
442 record change 2/2 to 'plain'? [Ynsfdaq?]
443
444 $ hg tip -p
445 changeset: 12:7d1e66983c15
446 tag: tip
447 user: test
448 date: Thu Jan 01 00:00:11 1970 +0000
449 summary: end-only
450
451 diff -r efca65c9b09e -r 7d1e66983c15 plain
452 --- a/plain Thu Jan 01 00:00:10 1970 +0000
453 +++ b/plain Thu Jan 01 00:00:11 1970 +0000
454 @@ -7,4 +7,4 @@
455 7
456 8
457 9
458 -10
459 +10.new
460
461
462 Record beginning
463
464 $ hg record -d '12 0' -m begin-only plain <<EOF
465 > y
466 > y
467 > EOF
468 diff --git a/plain b/plain
469 1 hunks, 3 lines changed
470 examine changes to 'plain'? [Ynsfdaq?]
471 @@ -1,6 +1,3 @@
472 -2
473 -2
474 -3
475 4
476 5
477 6
478 record this change to 'plain'? [Ynsfdaq?]
479
480 $ hg tip -p
481 changeset: 13:a09fc62a0e61
482 tag: tip
483 user: test
484 date: Thu Jan 01 00:00:12 1970 +0000
485 summary: begin-only
486
487 diff -r 7d1e66983c15 -r a09fc62a0e61 plain
488 --- a/plain Thu Jan 01 00:00:11 1970 +0000
489 +++ b/plain Thu Jan 01 00:00:12 1970 +0000
490 @@ -1,6 +1,3 @@
491 -2
492 -2
493 -3
494 4
495 5
496 6
497
498
499 Add to beginning, trim from end
500
501 $ rm plain
502 $ for i in 1 2 3 4 5 6 7 8 9; do
503 > echo $i >> plain
504 > done
505
506 Record end
507
508 $ hg record --traceback -d '13 0' -m end-again plain<<EOF
509 > y
510 > n
511 > y
512 > EOF
513 diff --git a/plain b/plain
514 2 hunks, 4 lines changed
515 examine changes to 'plain'? [Ynsfdaq?]
516 @@ -1,6 +1,9 @@
517 +1
518 +2
519 +3
520 4
521 5
522 6
523 7
524 8
525 9
526 record change 1/2 to 'plain'? [Ynsfdaq?]
527 @@ -1,7 +4,6 @@
528 4
529 5
530 6
531 7
532 8
533 9
534 -10.new
535 record change 2/2 to 'plain'? [Ynsfdaq?]
536
537 Add to beginning, middle, end
538
539 $ rm plain
540 $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do
541 > echo $i >> plain
542 > done
543
544 Record beginning, middle
545
546 $ hg record -d '14 0' -m middle-only plain <<EOF
547 > y
548 > y
549 > y
550 > n
551 > EOF
552 diff --git a/plain b/plain
553 3 hunks, 7 lines changed
554 examine changes to 'plain'? [Ynsfdaq?]
555 @@ -1,2 +1,5 @@
556 +1
557 +2
558 +3
559 4
560 5
561 record change 1/3 to 'plain'? [Ynsfdaq?]
562 @@ -1,6 +4,8 @@
563 4
564 5
565 +5.new
566 +5.reallynew
567 6
568 7
569 8
570 9
571 record change 2/3 to 'plain'? [Ynsfdaq?]
572 @@ -3,4 +8,6 @@
573 6
574 7
575 8
576 9
577 +10
578 +11
579 record change 3/3 to 'plain'? [Ynsfdaq?]
580
581 $ hg tip -p
582 changeset: 15:7d137997f3a6
583 tag: tip
584 user: test
585 date: Thu Jan 01 00:00:14 1970 +0000
586 summary: middle-only
587
588 diff -r c0b8e5fb0be6 -r 7d137997f3a6 plain
589 --- a/plain Thu Jan 01 00:00:13 1970 +0000
590 +++ b/plain Thu Jan 01 00:00:14 1970 +0000
591 @@ -1,5 +1,10 @@
592 +1
593 +2
594 +3
595 4
596 5
597 +5.new
598 +5.reallynew
599 6
600 7
601 8
602
603
604 Record end
605
606 $ hg record -d '15 0' -m end-only plain <<EOF
607 > y
608 > y
609 > EOF
610 diff --git a/plain b/plain
611 1 hunks, 2 lines changed
612 examine changes to 'plain'? [Ynsfdaq?]
613 @@ -9,3 +9,5 @@
614 7
615 8
616 9
617 +10
618 +11
619 record this change to 'plain'? [Ynsfdaq?]
620
621 $ hg tip -p
622 changeset: 16:4959e3ff13eb
623 tag: tip
624 user: test
625 date: Thu Jan 01 00:00:15 1970 +0000
626 summary: end-only
627
628 diff -r 7d137997f3a6 -r 4959e3ff13eb plain
629 --- a/plain Thu Jan 01 00:00:14 1970 +0000
630 +++ b/plain Thu Jan 01 00:00:15 1970 +0000
631 @@ -9,3 +9,5 @@
632 7
633 8
634 9
635 +10
636 +11
637
638
639 $ mkdir subdir
640 $ cd subdir
641 $ echo a > a
642 $ hg ci -d '16 0' -Amsubdir
643 adding subdir/a
644
645 $ echo a >> a
646 $ hg record -d '16 0' -m subdir-change a <<EOF
647 > y
648 > y
649 > EOF
650 diff --git a/subdir/a b/subdir/a
651 1 hunks, 1 lines changed
652 examine changes to 'subdir/a'? [Ynsfdaq?]
653 @@ -1,1 +1,2 @@
654 a
655 +a
656 record this change to 'subdir/a'? [Ynsfdaq?]
657
658 $ hg tip -p
659 changeset: 18:40698cd490b2
660 tag: tip
661 user: test
662 date: Thu Jan 01 00:00:16 1970 +0000
663 summary: subdir-change
664
665 diff -r 661eacdc08b9 -r 40698cd490b2 subdir/a
666 --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000
667 +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000
668 @@ -1,1 +1,2 @@
669 a
670 +a
671
672
673 $ echo a > f1
674 $ echo b > f2
675 $ hg add f1 f2
676
677 $ hg ci -mz -d '17 0'
678
679 $ echo a >> f1
680 $ echo b >> f2
681
682 Help, quit
683
684 $ hg record <<EOF
685 > ?
686 > q
687 > EOF
688 diff --git a/subdir/f1 b/subdir/f1
689 1 hunks, 1 lines changed
690 examine changes to 'subdir/f1'? [Ynsfdaq?]
691 y - record this change
692 n - skip this change
693 s - skip remaining changes to this file
694 f - record remaining changes to this file
695 d - done, skip remaining changes and files
696 a - record all changes to all remaining files
697 q - quit, recording no changes
698 ? - display help
699 examine changes to 'subdir/f1'? [Ynsfdaq?]
700 abort: user quit
701
702 Skip
703
704 $ hg record <<EOF
705 > s
706 > EOF
707 diff --git a/subdir/f1 b/subdir/f1
708 1 hunks, 1 lines changed
709 examine changes to 'subdir/f1'? [Ynsfdaq?]
710 diff --git a/subdir/f2 b/subdir/f2
711 1 hunks, 1 lines changed
712 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
713
714 No
715
716 $ hg record <<EOF
717 > n
718 > EOF
719 diff --git a/subdir/f1 b/subdir/f1
720 1 hunks, 1 lines changed
721 examine changes to 'subdir/f1'? [Ynsfdaq?]
722 diff --git a/subdir/f2 b/subdir/f2
723 1 hunks, 1 lines changed
724 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
725
726 f, quit
727
728 $ hg record <<EOF
729 > f
730 > q
731 > EOF
732 diff --git a/subdir/f1 b/subdir/f1
733 1 hunks, 1 lines changed
734 examine changes to 'subdir/f1'? [Ynsfdaq?]
735 diff --git a/subdir/f2 b/subdir/f2
736 1 hunks, 1 lines changed
737 examine changes to 'subdir/f2'? [Ynsfdaq?]
738 abort: user quit
739
740 s, all
741
742 $ hg record -d '18 0' -mx <<EOF
743 > s
744 > a
745 > EOF
746 diff --git a/subdir/f1 b/subdir/f1
747 1 hunks, 1 lines changed
748 examine changes to 'subdir/f1'? [Ynsfdaq?]
749 diff --git a/subdir/f2 b/subdir/f2
750 1 hunks, 1 lines changed
751 examine changes to 'subdir/f2'? [Ynsfdaq?]
752
753 $ hg tip -p
754 changeset: 20:d2d8c25276a8
755 tag: tip
756 user: test
757 date: Thu Jan 01 00:00:18 1970 +0000
758 summary: x
759
760 diff -r 25eb2a7694fb -r d2d8c25276a8 subdir/f2
761 --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000
762 +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000
763 @@ -1,1 +1,2 @@
764 b
765 +b
766
767
768 f
769
770 $ hg record -d '19 0' -my <<EOF
771 > f
772 > EOF
773 diff --git a/subdir/f1 b/subdir/f1
774 1 hunks, 1 lines changed
775 examine changes to 'subdir/f1'? [Ynsfdaq?]
776
777 $ hg tip -p
778 changeset: 21:1013f51ce32f
779 tag: tip
780 user: test
781 date: Thu Jan 01 00:00:19 1970 +0000
782 summary: y
783
784 diff -r d2d8c25276a8 -r 1013f51ce32f subdir/f1
785 --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000
786 +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000
787 @@ -1,1 +1,2 @@
788 a
789 +a
790
791
792 Preserve chmod +x
793
794 $ chmod +x f1
795 $ echo a >> f1
796 $ hg record -d '20 0' -mz <<EOF
797 > y
798 > y
799 > y
800 > EOF
801 diff --git a/subdir/f1 b/subdir/f1
802 old mode 100644
803 new mode 100755
804 1 hunks, 1 lines changed
805 examine changes to 'subdir/f1'? [Ynsfdaq?]
806 @@ -1,2 +1,3 @@
807 a
808 a
809 +a
810 record this change to 'subdir/f1'? [Ynsfdaq?]
811
812 $ hg tip --config diff.git=True -p
813 changeset: 22:5df857735621
814 tag: tip
815 user: test
816 date: Thu Jan 01 00:00:20 1970 +0000
817 summary: z
818
819 diff --git a/subdir/f1 b/subdir/f1
820 old mode 100644
821 new mode 100755
822 --- a/subdir/f1
823 +++ b/subdir/f1
824 @@ -1,2 +1,3 @@
825 a
826 a
827 +a
828
829
830 Preserve execute permission on original
831
832 $ echo b >> f1
833 $ hg record -d '21 0' -maa <<EOF
834 > y
835 > y
836 > y
837 > EOF
838 diff --git a/subdir/f1 b/subdir/f1
839 1 hunks, 1 lines changed
840 examine changes to 'subdir/f1'? [Ynsfdaq?]
841 @@ -1,3 +1,4 @@
842 a
843 a
844 a
845 +b
846 record this change to 'subdir/f1'? [Ynsfdaq?]
847
848 $ hg tip --config diff.git=True -p
849 changeset: 23:a4ae36a78715
850 tag: tip
851 user: test
852 date: Thu Jan 01 00:00:21 1970 +0000
853 summary: aa
854
855 diff --git a/subdir/f1 b/subdir/f1
856 --- a/subdir/f1
857 +++ b/subdir/f1
858 @@ -1,3 +1,4 @@
859 a
860 a
861 a
862 +b
863
864
865 Preserve chmod -x
866
867 $ chmod -x f1
868 $ echo c >> f1
869 $ hg record -d '22 0' -mab <<EOF
870 > y
871 > y
872 > y
873 > EOF
874 diff --git a/subdir/f1 b/subdir/f1
875 old mode 100755
876 new mode 100644
877 1 hunks, 1 lines changed
878 examine changes to 'subdir/f1'? [Ynsfdaq?]
879 @@ -2,3 +2,4 @@
880 a
881 a
882 b
883 +c
884 record this change to 'subdir/f1'? [Ynsfdaq?]
885
886 $ hg tip --config diff.git=True -p
887 changeset: 24:1460f6e47966
888 tag: tip
889 user: test
890 date: Thu Jan 01 00:00:22 1970 +0000
891 summary: ab
892
893 diff --git a/subdir/f1 b/subdir/f1
894 old mode 100755
895 new mode 100644
896 --- a/subdir/f1
897 +++ b/subdir/f1
898 @@ -2,3 +2,4 @@
899 a
900 a
901 b
902 +c
903
904
905 $ cd ..
906
907 Abort early when a merge is in progress
908
909 $ hg up 4
910 1 files updated, 0 files merged, 5 files removed, 0 files unresolved
911
912 $ touch iwillmergethat
913 $ hg add iwillmergethat
914
915 $ hg branch thatbranch
916 marked working directory as branch thatbranch
917
918 $ hg ci -m'new head'
919
920 $ hg up default
921 5 files updated, 0 files merged, 2 files removed, 0 files unresolved
922
923 $ hg merge thatbranch
924 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
925 (branch merge, don't forget to commit)
926
927 $ hg record -m'will abort'
928 abort: cannot partially commit a merge (use hg commit instead)
929
930 $ hg up -C
931 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
932
933 With win32text
934
935 $ echo '[extensions]' >> .hg/hgrc
936 $ echo 'win32text = ' >> .hg/hgrc
937 $ echo '[decode]' >> .hg/hgrc
938 $ echo '** = cleverdecode:' >> .hg/hgrc
939 $ echo '[encode]' >> .hg/hgrc
940 $ echo '** = cleverencode:' >> .hg/hgrc
941 $ echo '[patch]' >> .hg/hgrc
942 $ echo 'eol = crlf' >> .hg/hgrc
943
944 $ echo d >> subdir/f1
945 $ hg record -d '23 0' -mw1 <<EOF
946 > y
947 > y
948 > EOF
949 diff --git a/subdir/f1 b/subdir/f1
950 1 hunks, 1 lines changed
951 examine changes to 'subdir/f1'? [Ynsfdaq?]
952 @@ -3,3 +3,4 @@
953 a
954 b
955 c
956 +d
957 record this change to 'subdir/f1'? [Ynsfdaq?]
958
959 $ hg tip -p
960 changeset: 26:5bacc1f6e9cf
961 tag: tip
962 parent: 24:1460f6e47966
963 user: test
964 date: Thu Jan 01 00:00:23 1970 +0000
965 summary: w1
966
967 diff -r 1460f6e47966 -r 5bacc1f6e9cf subdir/f1
968 --- a/subdir/f1 Thu Jan 01 00:00:22 1970 +0000
969 +++ b/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
970 @@ -3,3 +3,4 @@
971 a
972 b
973 c
974 +d
975