##// END OF EJS Templates
tests: improve test-mv-cp-st-diff.t readability
Mads Kiilerich -
r18074:8c9a5249 default
parent child Browse files
Show More
@@ -21,11 +21,15 b' set up a boring main branch'
21 $ hg add x/y
21 $ hg add x/y
22 $ hg ci -m2
22 $ hg ci -m2
23 $ cd ..
23 $ cd ..
24
24 $ show()
25 $ show()
25 > {
26 > {
26 > echo "- $2: $1"
27 > echo "# $2:"
28 > echo
29 > echo "% hg st -C $1"
27 > hg st -C $1
30 > hg st -C $1
28 > echo
31 > echo
32 > echo "% hg diff --git $1"
29 > hg diff --git $1
33 > hg diff --git $1
30 > echo
34 > echo
31 > }
35 > }
@@ -35,24 +39,28 b' make a new branch and get diff/status ou'
35 $1 - first commit
39 $1 - first commit
36 $2 - second commit
40 $2 - second commit
37 $3 - working dir action
41 $3 - working dir action
38 $4 - test description
39
42
40 $ tb()
43 $ tb()
41 > {
44 > {
42 > hg clone t t2 ; cd t2
45 > hg clone -q t t2 ; cd t2
43 > hg co -q -C 0
46 > hg co -q -C 0
44 >
47 >
48 > echo % add a $count
45 > add a $count
49 > add a $count
46 > count=`expr $count + 1`
50 > count=`expr $count + 1`
51 > echo % hg ci -m "t0"
47 > hg ci -m "t0"
52 > hg ci -m "t0"
53 > echo % $1
48 > $1
54 > $1
55 > echo % hg ci -m "t1"
49 > hg ci -m "t1"
56 > hg ci -m "t1"
57 > echo % $2
50 > $2
58 > $2
59 > echo % hg ci -m "t2"
51 > hg ci -m "t2"
60 > hg ci -m "t2"
61 > echo % $3
52 > $3
62 > $3
53 >
63 > echo
54 > echo "** $4 **"
55 > echo "** $1 / $2 / $3"
56 > show "" "working to parent"
64 > show "" "working to parent"
57 > show "--rev 0" "working to root"
65 > show "--rev 0" "working to root"
58 > show "--rev 2" "working to branch"
66 > show "--rev 2" "working to branch"
@@ -64,26 +72,39 b' make a new branch and get diff/status ou'
64 > cd ..
72 > cd ..
65 > rm -rf t2
73 > rm -rf t2
66 > }
74 > }
67 $ tb "add a a1" "add a a2" "hg mv a b" "rename in working dir"
75
68 updating to branch default
76 rename in working dir
69 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
77
78 $ tb "add a a1" "add a a2" "hg mv a b"
79 % add a 0
80 % hg ci -m t0
70 created new head
81 created new head
71 ** rename in working dir **
82 % add a a1
72 ** add a a1 / add a a2 / hg mv a b
83 % hg ci -m t1
73 - working to parent:
84 % add a a2
85 % hg ci -m t2
86 % hg mv a b
87
88 # working to parent:
89
90 % hg st -C
74 A b
91 A b
75 a
92 a
76 R a
93 R a
77
94
95 % hg diff --git
78 diff --git a/a b/b
96 diff --git a/a b/b
79 rename from a
97 rename from a
80 rename to b
98 rename to b
81
99
82 - working to root: --rev 0
100 # working to root:
101
102 % hg st -C --rev 0
83 A b
103 A b
84 a
104 a
85 R a
105 R a
86
106
107 % hg diff --git --rev 0
87 diff --git a/a b/b
108 diff --git a/a b/b
88 rename from a
109 rename from a
89 rename to b
110 rename to b
@@ -95,12 +116,15 b' make a new branch and get diff/status ou'
95 +a1
116 +a1
96 +a2
117 +a2
97
118
98 - working to branch: --rev 2
119 # working to branch:
120
121 % hg st -C --rev 2
99 A b
122 A b
100 a
123 a
101 R a
124 R a
102 R x/y
125 R x/y
103
126
127 % hg diff --git --rev 2
104 diff --git a/a b/b
128 diff --git a/a b/b
105 rename from a
129 rename from a
106 rename to b
130 rename to b
@@ -120,9 +144,12 b' make a new branch and get diff/status ou'
120 @@ -1,1 +0,0 @@
144 @@ -1,1 +0,0 @@
121 -y1
145 -y1
122
146
123 - root to parent: --rev 0 --rev .
147 # root to parent:
148
149 % hg st -C --rev 0 --rev .
124 M a
150 M a
125
151
152 % hg diff --git --rev 0 --rev .
126 diff --git a/a b/a
153 diff --git a/a b/a
127 --- a/a
154 --- a/a
128 +++ b/a
155 +++ b/a
@@ -132,9 +159,12 b' make a new branch and get diff/status ou'
132 +a1
159 +a1
133 +a2
160 +a2
134
161
135 - parent to root: --rev . --rev 0
162 # parent to root:
163
164 % hg st -C --rev . --rev 0
136 M a
165 M a
137
166
167 % hg diff --git --rev . --rev 0
138 diff --git a/a b/a
168 diff --git a/a b/a
139 --- a/a
169 --- a/a
140 +++ b/a
170 +++ b/a
@@ -144,10 +174,13 b' make a new branch and get diff/status ou'
144 -a1
174 -a1
145 -a2
175 -a2
146
176
147 - branch to parent: --rev 2 --rev .
177 # branch to parent:
178
179 % hg st -C --rev 2 --rev .
148 M a
180 M a
149 R x/y
181 R x/y
150
182
183 % hg diff --git --rev 2 --rev .
151 diff --git a/a b/a
184 diff --git a/a b/a
152 --- a/a
185 --- a/a
153 +++ b/a
186 +++ b/a
@@ -165,10 +198,13 b' make a new branch and get diff/status ou'
165 @@ -1,1 +0,0 @@
198 @@ -1,1 +0,0 @@
166 -y1
199 -y1
167
200
168 - parent to branch: --rev . --rev 2
201 # parent to branch:
202
203 % hg st -C --rev . --rev 2
169 M a
204 M a
170 A x/y
205 A x/y
171
206
207 % hg diff --git --rev . --rev 2
172 diff --git a/a b/a
208 diff --git a/a b/a
173 --- a/a
209 --- a/a
174 +++ b/a
210 +++ b/a
@@ -187,25 +223,37 b' make a new branch and get diff/status ou'
187 +y1
223 +y1
188
224
189
225
190 $ tb "add a a1" "add a a2" "hg cp a b" "copy in working dir"
226 copy in working dir
191 updating to branch default
227
192 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 $ tb "add a a1" "add a a2" "hg cp a b"
229 % add a 1
230 % hg ci -m t0
193 created new head
231 created new head
194 ** copy in working dir **
232 % add a a1
195 ** add a a1 / add a a2 / hg cp a b
233 % hg ci -m t1
196 - working to parent:
234 % add a a2
235 % hg ci -m t2
236 % hg cp a b
237
238 # working to parent:
239
240 % hg st -C
197 A b
241 A b
198 a
242 a
199
243
244 % hg diff --git
200 diff --git a/a b/b
245 diff --git a/a b/b
201 copy from a
246 copy from a
202 copy to b
247 copy to b
203
248
204 - working to root: --rev 0
249 # working to root:
250
251 % hg st -C --rev 0
205 M a
252 M a
206 A b
253 A b
207 a
254 a
208
255
256 % hg diff --git --rev 0
209 diff --git a/a b/a
257 diff --git a/a b/a
210 --- a/a
258 --- a/a
211 +++ b/a
259 +++ b/a
@@ -225,12 +273,15 b' make a new branch and get diff/status ou'
225 +a1
273 +a1
226 +a2
274 +a2
227
275
228 - working to branch: --rev 2
276 # working to branch:
277
278 % hg st -C --rev 2
229 M a
279 M a
230 A b
280 A b
231 a
281 a
232 R x/y
282 R x/y
233
283
284 % hg diff --git --rev 2
234 diff --git a/a b/a
285 diff --git a/a b/a
235 --- a/a
286 --- a/a
236 +++ b/a
287 +++ b/a
@@ -260,9 +311,12 b' make a new branch and get diff/status ou'
260 @@ -1,1 +0,0 @@
311 @@ -1,1 +0,0 @@
261 -y1
312 -y1
262
313
263 - root to parent: --rev 0 --rev .
314 # root to parent:
315
316 % hg st -C --rev 0 --rev .
264 M a
317 M a
265
318
319 % hg diff --git --rev 0 --rev .
266 diff --git a/a b/a
320 diff --git a/a b/a
267 --- a/a
321 --- a/a
268 +++ b/a
322 +++ b/a
@@ -272,9 +326,12 b' make a new branch and get diff/status ou'
272 +a1
326 +a1
273 +a2
327 +a2
274
328
275 - parent to root: --rev . --rev 0
329 # parent to root:
330
331 % hg st -C --rev . --rev 0
276 M a
332 M a
277
333
334 % hg diff --git --rev . --rev 0
278 diff --git a/a b/a
335 diff --git a/a b/a
279 --- a/a
336 --- a/a
280 +++ b/a
337 +++ b/a
@@ -284,10 +341,13 b' make a new branch and get diff/status ou'
284 -a1
341 -a1
285 -a2
342 -a2
286
343
287 - branch to parent: --rev 2 --rev .
344 # branch to parent:
345
346 % hg st -C --rev 2 --rev .
288 M a
347 M a
289 R x/y
348 R x/y
290
349
350 % hg diff --git --rev 2 --rev .
291 diff --git a/a b/a
351 diff --git a/a b/a
292 --- a/a
352 --- a/a
293 +++ b/a
353 +++ b/a
@@ -305,10 +365,13 b' make a new branch and get diff/status ou'
305 @@ -1,1 +0,0 @@
365 @@ -1,1 +0,0 @@
306 -y1
366 -y1
307
367
308 - parent to branch: --rev . --rev 2
368 # parent to branch:
369
370 % hg st -C --rev . --rev 2
309 M a
371 M a
310 A x/y
372 A x/y
311
373
374 % hg diff --git --rev . --rev 2
312 diff --git a/a b/a
375 diff --git a/a b/a
313 --- a/a
376 --- a/a
314 +++ b/a
377 +++ b/a
@@ -327,15 +390,24 b' make a new branch and get diff/status ou'
327 +y1
390 +y1
328
391
329
392
330 $ tb "hg mv a b" "add b b1" "add b w" "single rename"
393 single rename
331 updating to branch default
394
332 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
395 $ tb "hg mv a b" "add b b1" "add b w"
396 % add a 2
397 % hg ci -m t0
333 created new head
398 created new head
334 ** single rename **
399 % hg mv a b
335 ** hg mv a b / add b b1 / add b w
400 % hg ci -m t1
336 - working to parent:
401 % add b b1
402 % hg ci -m t2
403 % add b w
404
405 # working to parent:
406
407 % hg st -C
337 M b
408 M b
338
409
410 % hg diff --git
339 diff --git a/b b/b
411 diff --git a/b b/b
340 --- a/b
412 --- a/b
341 +++ b/b
413 +++ b/b
@@ -345,11 +417,14 b' make a new branch and get diff/status ou'
345 b1
417 b1
346 +w
418 +w
347
419
348 - working to root: --rev 0
420 # working to root:
421
422 % hg st -C --rev 0
349 A b
423 A b
350 a
424 a
351 R a
425 R a
352
426
427 % hg diff --git --rev 0
353 diff --git a/a b/b
428 diff --git a/a b/b
354 rename from a
429 rename from a
355 rename to b
430 rename to b
@@ -361,12 +436,15 b' make a new branch and get diff/status ou'
361 +b1
436 +b1
362 +w
437 +w
363
438
364 - working to branch: --rev 2
439 # working to branch:
440
441 % hg st -C --rev 2
365 A b
442 A b
366 a
443 a
367 R a
444 R a
368 R x/y
445 R x/y
369
446
447 % hg diff --git --rev 2
370 diff --git a/a b/b
448 diff --git a/a b/b
371 rename from a
449 rename from a
372 rename to b
450 rename to b
@@ -386,11 +464,14 b' make a new branch and get diff/status ou'
386 @@ -1,1 +0,0 @@
464 @@ -1,1 +0,0 @@
387 -y1
465 -y1
388
466
389 - root to parent: --rev 0 --rev .
467 # root to parent:
468
469 % hg st -C --rev 0 --rev .
390 A b
470 A b
391 a
471 a
392 R a
472 R a
393
473
474 % hg diff --git --rev 0 --rev .
394 diff --git a/a b/b
475 diff --git a/a b/b
395 rename from a
476 rename from a
396 rename to b
477 rename to b
@@ -401,11 +482,14 b' make a new branch and get diff/status ou'
401 +2
482 +2
402 +b1
483 +b1
403
484
404 - parent to root: --rev . --rev 0
485 # parent to root:
486
487 % hg st -C --rev . --rev 0
405 A a
488 A a
406 b
489 b
407 R b
490 R b
408
491
492 % hg diff --git --rev . --rev 0
409 diff --git a/b b/a
493 diff --git a/b b/a
410 rename from b
494 rename from b
411 rename to a
495 rename to a
@@ -416,12 +500,15 b' make a new branch and get diff/status ou'
416 -2
500 -2
417 -b1
501 -b1
418
502
419 - branch to parent: --rev 2 --rev .
503 # branch to parent:
504
505 % hg st -C --rev 2 --rev .
420 A b
506 A b
421 a
507 a
422 R a
508 R a
423 R x/y
509 R x/y
424
510
511 % hg diff --git --rev 2 --rev .
425 diff --git a/a b/b
512 diff --git a/a b/b
426 rename from a
513 rename from a
427 rename to b
514 rename to b
@@ -440,12 +527,15 b' make a new branch and get diff/status ou'
440 @@ -1,1 +0,0 @@
527 @@ -1,1 +0,0 @@
441 -y1
528 -y1
442
529
443 - parent to branch: --rev . --rev 2
530 # parent to branch:
531
532 % hg st -C --rev . --rev 2
444 A a
533 A a
445 b
534 b
446 A x/y
535 A x/y
447 R b
536 R b
448
537
538 % hg diff --git --rev . --rev 2
449 diff --git a/b b/a
539 diff --git a/b b/a
450 rename from b
540 rename from b
451 rename to a
541 rename to a
@@ -465,15 +555,24 b' make a new branch and get diff/status ou'
465 +y1
555 +y1
466
556
467
557
468 $ tb "hg cp a b" "add b b1" "add a w" "single copy"
558 single copy
469 updating to branch default
559
470 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
560 $ tb "hg cp a b" "add b b1" "add a w"
561 % add a 3
562 % hg ci -m t0
471 created new head
563 created new head
472 ** single copy **
564 % hg cp a b
473 ** hg cp a b / add b b1 / add a w
565 % hg ci -m t1
474 - working to parent:
566 % add b b1
567 % hg ci -m t2
568 % add a w
569
570 # working to parent:
571
572 % hg st -C
475 M a
573 M a
476
574
575 % hg diff --git
477 diff --git a/a b/a
576 diff --git a/a b/a
478 --- a/a
577 --- a/a
479 +++ b/a
578 +++ b/a
@@ -482,11 +581,14 b' make a new branch and get diff/status ou'
482 3
581 3
483 +w
582 +w
484
583
485 - working to root: --rev 0
584 # working to root:
585
586 % hg st -C --rev 0
486 M a
587 M a
487 A b
588 A b
488 a
589 a
489
590
591 % hg diff --git --rev 0
490 diff --git a/a b/a
592 diff --git a/a b/a
491 --- a/a
593 --- a/a
492 +++ b/a
594 +++ b/a
@@ -504,12 +606,15 b' make a new branch and get diff/status ou'
504 +3
606 +3
505 +b1
607 +b1
506
608
507 - working to branch: --rev 2
609 # working to branch:
610
611 % hg st -C --rev 2
508 M a
612 M a
509 A b
613 A b
510 a
614 a
511 R x/y
615 R x/y
512
616
617 % hg diff --git --rev 2
513 diff --git a/a b/a
618 diff --git a/a b/a
514 --- a/a
619 --- a/a
515 +++ b/a
620 +++ b/a
@@ -537,11 +642,14 b' make a new branch and get diff/status ou'
537 @@ -1,1 +0,0 @@
642 @@ -1,1 +0,0 @@
538 -y1
643 -y1
539
644
540 - root to parent: --rev 0 --rev .
645 # root to parent:
646
647 % hg st -C --rev 0 --rev .
541 M a
648 M a
542 A b
649 A b
543 a
650 a
544
651
652 % hg diff --git --rev 0 --rev .
545 diff --git a/a b/a
653 diff --git a/a b/a
546 --- a/a
654 --- a/a
547 +++ b/a
655 +++ b/a
@@ -558,11 +666,14 b' make a new branch and get diff/status ou'
558 +3
666 +3
559 +b1
667 +b1
560
668
561 - parent to root: --rev . --rev 0
669 # parent to root:
670
671 % hg st -C --rev . --rev 0
562 M a
672 M a
563 b
673 b
564 R b
674 R b
565
675
676 % hg diff --git --rev . --rev 0
566 diff --git a/a b/a
677 diff --git a/a b/a
567 --- a/a
678 --- a/a
568 +++ b/a
679 +++ b/a
@@ -578,12 +689,15 b' make a new branch and get diff/status ou'
578 -3
689 -3
579 -b1
690 -b1
580
691
581 - branch to parent: --rev 2 --rev .
692 # branch to parent:
693
694 % hg st -C --rev 2 --rev .
582 M a
695 M a
583 A b
696 A b
584 a
697 a
585 R x/y
698 R x/y
586
699
700 % hg diff --git --rev 2 --rev .
587 diff --git a/a b/a
701 diff --git a/a b/a
588 --- a/a
702 --- a/a
589 +++ b/a
703 +++ b/a
@@ -610,12 +724,15 b' make a new branch and get diff/status ou'
610 @@ -1,1 +0,0 @@
724 @@ -1,1 +0,0 @@
611 -y1
725 -y1
612
726
613 - parent to branch: --rev . --rev 2
727 # parent to branch:
728
729 % hg st -C --rev . --rev 2
614 M a
730 M a
615 b
731 b
616 A x/y
732 A x/y
617 R b
733 R b
618
734
735 % hg diff --git --rev . --rev 2
619 diff --git a/a b/a
736 diff --git a/a b/a
620 --- a/a
737 --- a/a
621 +++ b/a
738 +++ b/a
@@ -640,26 +757,38 b' make a new branch and get diff/status ou'
640 +y1
757 +y1
641
758
642
759
643 $ tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain"
760 rename chain
644 updating to branch default
761
645 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
762 $ tb "hg mv a b" "hg mv b c" "hg mv c d"
763 % add a 4
764 % hg ci -m t0
646 created new head
765 created new head
647 ** rename chain **
766 % hg mv a b
648 ** hg mv a b / hg mv b c / hg mv c d
767 % hg ci -m t1
649 - working to parent:
768 % hg mv b c
769 % hg ci -m t2
770 % hg mv c d
771
772 # working to parent:
773
774 % hg st -C
650 A d
775 A d
651 c
776 c
652 R c
777 R c
653
778
779 % hg diff --git
654 diff --git a/c b/d
780 diff --git a/c b/d
655 rename from c
781 rename from c
656 rename to d
782 rename to d
657
783
658 - working to root: --rev 0
784 # working to root:
785
786 % hg st -C --rev 0
659 A d
787 A d
660 a
788 a
661 R a
789 R a
662
790
791 % hg diff --git --rev 0
663 diff --git a/a b/d
792 diff --git a/a b/d
664 rename from a
793 rename from a
665 rename to d
794 rename to d
@@ -669,12 +798,15 b' make a new branch and get diff/status ou'
669 a
798 a
670 +4
799 +4
671
800
672 - working to branch: --rev 2
801 # working to branch:
802
803 % hg st -C --rev 2
673 A d
804 A d
674 a
805 a
675 R a
806 R a
676 R x/y
807 R x/y
677
808
809 % hg diff --git --rev 2
678 diff --git a/a b/d
810 diff --git a/a b/d
679 rename from a
811 rename from a
680 rename to d
812 rename to d
@@ -692,11 +824,14 b' make a new branch and get diff/status ou'
692 @@ -1,1 +0,0 @@
824 @@ -1,1 +0,0 @@
693 -y1
825 -y1
694
826
695 - root to parent: --rev 0 --rev .
827 # root to parent:
828
829 % hg st -C --rev 0 --rev .
696 A c
830 A c
697 a
831 a
698 R a
832 R a
699
833
834 % hg diff --git --rev 0 --rev .
700 diff --git a/a b/c
835 diff --git a/a b/c
701 rename from a
836 rename from a
702 rename to c
837 rename to c
@@ -706,11 +841,14 b' make a new branch and get diff/status ou'
706 a
841 a
707 +4
842 +4
708
843
709 - parent to root: --rev . --rev 0
844 # parent to root:
845
846 % hg st -C --rev . --rev 0
710 A a
847 A a
711 c
848 c
712 R c
849 R c
713
850
851 % hg diff --git --rev . --rev 0
714 diff --git a/c b/a
852 diff --git a/c b/a
715 rename from c
853 rename from c
716 rename to a
854 rename to a
@@ -720,12 +858,15 b' make a new branch and get diff/status ou'
720 a
858 a
721 -4
859 -4
722
860
723 - branch to parent: --rev 2 --rev .
861 # branch to parent:
862
863 % hg st -C --rev 2 --rev .
724 A c
864 A c
725 a
865 a
726 R a
866 R a
727 R x/y
867 R x/y
728
868
869 % hg diff --git --rev 2 --rev .
729 diff --git a/a b/c
870 diff --git a/a b/c
730 rename from a
871 rename from a
731 rename to c
872 rename to c
@@ -743,12 +884,15 b' make a new branch and get diff/status ou'
743 @@ -1,1 +0,0 @@
884 @@ -1,1 +0,0 @@
744 -y1
885 -y1
745
886
746 - parent to branch: --rev . --rev 2
887 # parent to branch:
888
889 % hg st -C --rev . --rev 2
747 A a
890 A a
748 c
891 c
749 A x/y
892 A x/y
750 R c
893 R c
751
894
895 % hg diff --git --rev . --rev 2
752 diff --git a/c b/a
896 diff --git a/c b/a
753 rename from c
897 rename from c
754 rename to a
898 rename to a
@@ -767,21 +911,32 b' make a new branch and get diff/status ou'
767 +y1
911 +y1
768
912
769
913
770 $ tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain"
914 copy chain
771 updating to branch default
915
772 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
916 $ tb "hg cp a b" "hg cp b c" "hg cp c d"
917 % add a 5
918 % hg ci -m t0
773 created new head
919 created new head
774 ** copy chain **
920 % hg cp a b
775 ** hg cp a b / hg cp b c / hg cp c d
921 % hg ci -m t1
776 - working to parent:
922 % hg cp b c
923 % hg ci -m t2
924 % hg cp c d
925
926 # working to parent:
927
928 % hg st -C
777 A d
929 A d
778 c
930 c
779
931
932 % hg diff --git
780 diff --git a/c b/d
933 diff --git a/c b/d
781 copy from c
934 copy from c
782 copy to d
935 copy to d
783
936
784 - working to root: --rev 0
937 # working to root:
938
939 % hg st -C --rev 0
785 M a
940 M a
786 A b
941 A b
787 a
942 a
@@ -790,6 +945,7 b' make a new branch and get diff/status ou'
790 A d
945 A d
791 a
946 a
792
947
948 % hg diff --git --rev 0
793 diff --git a/a b/a
949 diff --git a/a b/a
794 --- a/a
950 --- a/a
795 +++ b/a
951 +++ b/a
@@ -821,7 +977,9 b' make a new branch and get diff/status ou'
821 a
977 a
822 +5
978 +5
823
979
824 - working to branch: --rev 2
980 # working to branch:
981
982 % hg st -C --rev 2
825 M a
983 M a
826 A b
984 A b
827 a
985 a
@@ -831,6 +989,7 b' make a new branch and get diff/status ou'
831 a
989 a
832 R x/y
990 R x/y
833
991
992 % hg diff --git --rev 2
834 diff --git a/a b/a
993 diff --git a/a b/a
835 --- a/a
994 --- a/a
836 +++ b/a
995 +++ b/a
@@ -876,13 +1035,16 b' make a new branch and get diff/status ou'
876 @@ -1,1 +0,0 @@
1035 @@ -1,1 +0,0 @@
877 -y1
1036 -y1
878
1037
879 - root to parent: --rev 0 --rev .
1038 # root to parent:
1039
1040 % hg st -C --rev 0 --rev .
880 M a
1041 M a
881 A b
1042 A b
882 a
1043 a
883 A c
1044 A c
884 a
1045 a
885
1046
1047 % hg diff --git --rev 0 --rev .
886 diff --git a/a b/a
1048 diff --git a/a b/a
887 --- a/a
1049 --- a/a
888 +++ b/a
1050 +++ b/a
@@ -906,12 +1068,15 b' make a new branch and get diff/status ou'
906 a
1068 a
907 +5
1069 +5
908
1070
909 - parent to root: --rev . --rev 0
1071 # parent to root:
1072
1073 % hg st -C --rev . --rev 0
910 M a
1074 M a
911 b
1075 b
912 R b
1076 R b
913 R c
1077 R c
914
1078
1079 % hg diff --git --rev . --rev 0
915 diff --git a/a b/a
1080 diff --git a/a b/a
916 --- a/a
1081 --- a/a
917 +++ b/a
1082 +++ b/a
@@ -933,7 +1098,9 b' make a new branch and get diff/status ou'
933 -a
1098 -a
934 -5
1099 -5
935
1100
936 - branch to parent: --rev 2 --rev .
1101 # branch to parent:
1102
1103 % hg st -C --rev 2 --rev .
937 M a
1104 M a
938 A b
1105 A b
939 a
1106 a
@@ -941,6 +1108,7 b' make a new branch and get diff/status ou'
941 a
1108 a
942 R x/y
1109 R x/y
943
1110
1111 % hg diff --git --rev 2 --rev .
944 diff --git a/a b/a
1112 diff --git a/a b/a
945 --- a/a
1113 --- a/a
946 +++ b/a
1114 +++ b/a
@@ -976,13 +1144,16 b' make a new branch and get diff/status ou'
976 @@ -1,1 +0,0 @@
1144 @@ -1,1 +0,0 @@
977 -y1
1145 -y1
978
1146
979 - parent to branch: --rev . --rev 2
1147 # parent to branch:
1148
1149 % hg st -C --rev . --rev 2
980 M a
1150 M a
981 b
1151 b
982 A x/y
1152 A x/y
983 R b
1153 R b
984 R c
1154 R c
985
1155
1156 % hg diff --git --rev . --rev 2
986 diff --git a/a b/a
1157 diff --git a/a b/a
987 --- a/a
1158 --- a/a
988 +++ b/a
1159 +++ b/a
@@ -1013,24 +1184,36 b' make a new branch and get diff/status ou'
1013 +y1
1184 +y1
1014
1185
1015
1186
1016 $ tb "add a a1" "hg mv a b" "hg mv b a" "circular rename"
1187 circular rename
1017 updating to branch default
1188
1018 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1189 $ tb "add a a1" "hg mv a b" "hg mv b a"
1190 % add a 6
1191 % hg ci -m t0
1019 created new head
1192 created new head
1020 ** circular rename **
1193 % add a a1
1021 ** add a a1 / hg mv a b / hg mv b a
1194 % hg ci -m t1
1022 - working to parent:
1195 % hg mv a b
1196 % hg ci -m t2
1197 % hg mv b a
1198
1199 # working to parent:
1200
1201 % hg st -C
1023 A a
1202 A a
1024 b
1203 b
1025 R b
1204 R b
1026
1205
1206 % hg diff --git
1027 diff --git a/b b/a
1207 diff --git a/b b/a
1028 rename from b
1208 rename from b
1029 rename to a
1209 rename to a
1030
1210
1031 - working to root: --rev 0
1211 # working to root:
1212
1213 % hg st -C --rev 0
1032 M a
1214 M a
1033
1215
1216 % hg diff --git --rev 0
1034 diff --git a/a b/a
1217 diff --git a/a b/a
1035 --- a/a
1218 --- a/a
1036 +++ b/a
1219 +++ b/a
@@ -1039,10 +1222,13 b' make a new branch and get diff/status ou'
1039 +6
1222 +6
1040 +a1
1223 +a1
1041
1224
1042 - working to branch: --rev 2
1225 # working to branch:
1226
1227 % hg st -C --rev 2
1043 M a
1228 M a
1044 R x/y
1229 R x/y
1045
1230
1231 % hg diff --git --rev 2
1046 diff --git a/a b/a
1232 diff --git a/a b/a
1047 --- a/a
1233 --- a/a
1048 +++ b/a
1234 +++ b/a
@@ -1059,11 +1245,14 b' make a new branch and get diff/status ou'
1059 @@ -1,1 +0,0 @@
1245 @@ -1,1 +0,0 @@
1060 -y1
1246 -y1
1061
1247
1062 - root to parent: --rev 0 --rev .
1248 # root to parent:
1249
1250 % hg st -C --rev 0 --rev .
1063 A b
1251 A b
1064 a
1252 a
1065 R a
1253 R a
1066
1254
1255 % hg diff --git --rev 0 --rev .
1067 diff --git a/a b/b
1256 diff --git a/a b/b
1068 rename from a
1257 rename from a
1069 rename to b
1258 rename to b
@@ -1074,11 +1263,14 b' make a new branch and get diff/status ou'
1074 +6
1263 +6
1075 +a1
1264 +a1
1076
1265
1077 - parent to root: --rev . --rev 0
1266 # parent to root:
1267
1268 % hg st -C --rev . --rev 0
1078 A a
1269 A a
1079 b
1270 b
1080 R b
1271 R b
1081
1272
1273 % hg diff --git --rev . --rev 0
1082 diff --git a/b b/a
1274 diff --git a/b b/a
1083 rename from b
1275 rename from b
1084 rename to a
1276 rename to a
@@ -1089,12 +1281,15 b' make a new branch and get diff/status ou'
1089 -6
1281 -6
1090 -a1
1282 -a1
1091
1283
1092 - branch to parent: --rev 2 --rev .
1284 # branch to parent:
1285
1286 % hg st -C --rev 2 --rev .
1093 A b
1287 A b
1094 a
1288 a
1095 R a
1289 R a
1096 R x/y
1290 R x/y
1097
1291
1292 % hg diff --git --rev 2 --rev .
1098 diff --git a/a b/b
1293 diff --git a/a b/b
1099 rename from a
1294 rename from a
1100 rename to b
1295 rename to b
@@ -1113,12 +1308,15 b' make a new branch and get diff/status ou'
1113 @@ -1,1 +0,0 @@
1308 @@ -1,1 +0,0 @@
1114 -y1
1309 -y1
1115
1310
1116 - parent to branch: --rev . --rev 2
1311 # parent to branch:
1312
1313 % hg st -C --rev . --rev 2
1117 A a
1314 A a
1118 b
1315 b
1119 A x/y
1316 A x/y
1120 R b
1317 R b
1121
1318
1319 % hg diff --git --rev . --rev 2
1122 diff --git a/b b/a
1320 diff --git a/b b/a
1123 rename from b
1321 rename from b
1124 rename to a
1322 rename to a
@@ -1138,16 +1336,25 b' make a new branch and get diff/status ou'
1138 +y1
1336 +y1
1139
1337
1140
1338
1141 $ tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move"
1339 directory move
1142 updating to branch default
1340
1143 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1341 $ tb "hg mv x y" "add y/x x1" "add y/x x2"
1342 % add a 7
1343 % hg ci -m t0
1144 created new head
1344 created new head
1145 moving x/x to y/x (glob)
1345 % hg mv x y
1146 ** directory move **
1346 moving x/x to y/x
1147 ** hg mv x y / add y/x x1 / add y/x x2
1347 % hg ci -m t1
1148 - working to parent:
1348 % add y/x x1
1349 % hg ci -m t2
1350 % add y/x x2
1351
1352 # working to parent:
1353
1354 % hg st -C
1149 M y/x
1355 M y/x
1150
1356
1357 % hg diff --git
1151 diff --git a/y/x b/y/x
1358 diff --git a/y/x b/y/x
1152 --- a/y/x
1359 --- a/y/x
1153 +++ b/y/x
1360 +++ b/y/x
@@ -1156,12 +1363,15 b' make a new branch and get diff/status ou'
1156 x1
1363 x1
1157 +x2
1364 +x2
1158
1365
1159 - working to root: --rev 0
1366 # working to root:
1367
1368 % hg st -C --rev 0
1160 M a
1369 M a
1161 A y/x
1370 A y/x
1162 x/x
1371 x/x
1163 R x/x
1372 R x/x
1164
1373
1374 % hg diff --git --rev 0
1165 diff --git a/a b/a
1375 diff --git a/a b/a
1166 --- a/a
1376 --- a/a
1167 +++ b/a
1377 +++ b/a
@@ -1178,13 +1388,16 b' make a new branch and get diff/status ou'
1178 +x1
1388 +x1
1179 +x2
1389 +x2
1180
1390
1181 - working to branch: --rev 2
1391 # working to branch:
1392
1393 % hg st -C --rev 2
1182 M a
1394 M a
1183 A y/x
1395 A y/x
1184 x/x
1396 x/x
1185 R x/x
1397 R x/x
1186 R x/y
1398 R x/y
1187
1399
1400 % hg diff --git --rev 2
1188 diff --git a/a b/a
1401 diff --git a/a b/a
1189 --- a/a
1402 --- a/a
1190 +++ b/a
1403 +++ b/a
@@ -1209,12 +1422,15 b' make a new branch and get diff/status ou'
1209 +x1
1422 +x1
1210 +x2
1423 +x2
1211
1424
1212 - root to parent: --rev 0 --rev .
1425 # root to parent:
1426
1427 % hg st -C --rev 0 --rev .
1213 M a
1428 M a
1214 A y/x
1429 A y/x
1215 x/x
1430 x/x
1216 R x/x
1431 R x/x
1217
1432
1433 % hg diff --git --rev 0 --rev .
1218 diff --git a/a b/a
1434 diff --git a/a b/a
1219 --- a/a
1435 --- a/a
1220 +++ b/a
1436 +++ b/a
@@ -1230,12 +1446,15 b' make a new branch and get diff/status ou'
1230 x
1446 x
1231 +x1
1447 +x1
1232
1448
1233 - parent to root: --rev . --rev 0
1449 # parent to root:
1450
1451 % hg st -C --rev . --rev 0
1234 M a
1452 M a
1235 A x/x
1453 A x/x
1236 y/x
1454 y/x
1237 R y/x
1455 R y/x
1238
1456
1457 % hg diff --git --rev . --rev 0
1239 diff --git a/a b/a
1458 diff --git a/a b/a
1240 --- a/a
1459 --- a/a
1241 +++ b/a
1460 +++ b/a
@@ -1251,13 +1470,16 b' make a new branch and get diff/status ou'
1251 x
1470 x
1252 -x1
1471 -x1
1253
1472
1254 - branch to parent: --rev 2 --rev .
1473 # branch to parent:
1474
1475 % hg st -C --rev 2 --rev .
1255 M a
1476 M a
1256 A y/x
1477 A y/x
1257 x/x
1478 x/x
1258 R x/x
1479 R x/x
1259 R x/y
1480 R x/y
1260
1481
1482 % hg diff --git --rev 2 --rev .
1261 diff --git a/a b/a
1483 diff --git a/a b/a
1262 --- a/a
1484 --- a/a
1263 +++ b/a
1485 +++ b/a
@@ -1281,13 +1503,16 b' make a new branch and get diff/status ou'
1281 x
1503 x
1282 +x1
1504 +x1
1283
1505
1284 - parent to branch: --rev . --rev 2
1506 # parent to branch:
1507
1508 % hg st -C --rev . --rev 2
1285 M a
1509 M a
1286 A x/x
1510 A x/x
1287 y/x
1511 y/x
1288 A x/y
1512 A x/y
1289 R y/x
1513 R y/x
1290
1514
1515 % hg diff --git --rev . --rev 2
1291 diff --git a/a b/a
1516 diff --git a/a b/a
1292 --- a/a
1517 --- a/a
1293 +++ b/a
1518 +++ b/a
@@ -1318,14 +1543,14 b' testing copies with unrelated branch'
1318
1543
1319 $ hg init unrelated
1544 $ hg init unrelated
1320 $ cd unrelated
1545 $ cd unrelated
1321 $ add a a
1546 $ echo a >> a
1322 $ hg ci -Am adda
1547 $ hg ci -Am adda
1323 adding a
1548 adding a
1324 $ hg mv a b
1549 $ hg mv a b
1325 $ hg ci -m movea
1550 $ hg ci -m movea
1326 $ hg up -C null
1551 $ hg up -C null
1327 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1552 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1328 $ add a a
1553 $ echo a >> a
1329 $ hg ci -Am addunrelateda
1554 $ hg ci -Am addunrelateda
1330 adding a
1555 adding a
1331 created new head
1556 created new head
General Comments 0
You need to be logged in to leave comments. Login now