##// END OF EJS Templates
test-obsolete: better logging template...
Pierre-Yves David -
r21978:c21c1c8c default
parent child Browse files
Show More
@@ -2,6 +2,8
2 2 > [phases]
3 3 > # public changeset are not obsolete
4 4 > publish=false
5 > [ui]
6 > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
5 7 > EOF
6 8 $ mkcommit() {
7 9 > echo "$1" > "$1"
@@ -58,11 +60,7 Killing a single changeset without repla
58 60
59 61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
60 62 $ hg tip
61 changeset: -1:000000000000
62 tag: tip
63 user:
64 date: Thu Jan 01 00:00:00 1970 +0000
65
63 -1:000000000000 (public) [tip ]
66 64 $ hg up --hidden tip --quiet
67 65 $ cd ..
68 66
@@ -125,59 +123,22 Refuse pathological nullid successors
125 123 Check that graphlog detect that a changeset is obsolete:
126 124
127 125 $ hg log -G
128 @ changeset: 5:5601fb93a350
129 | tag: tip
130 | parent: 1:7c3bad9141dc
131 | user: test
132 | date: Thu Jan 01 00:00:00 1970 +0000
133 | summary: add new_3_c
126 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
134 127 |
135 o changeset: 1:7c3bad9141dc
136 | user: test
137 | date: Thu Jan 01 00:00:00 1970 +0000
138 | summary: add b
128 o 1:7c3bad9141dc (draft) [ ] add b
139 129 |
140 o changeset: 0:1f0dee641bb7
141 user: test
142 date: Thu Jan 01 00:00:00 1970 +0000
143 summary: add a
130 o 0:1f0dee641bb7 (draft) [ ] add a
144 131
145 132
146 133 check that heads does not report them
147 134
148 135 $ hg heads
149 changeset: 5:5601fb93a350
150 tag: tip
151 parent: 1:7c3bad9141dc
152 user: test
153 date: Thu Jan 01 00:00:00 1970 +0000
154 summary: add new_3_c
155
136 5:5601fb93a350 (draft) [tip ] add new_3_c
156 137 $ hg heads --hidden
157 changeset: 5:5601fb93a350
158 tag: tip
159 parent: 1:7c3bad9141dc
160 user: test
161 date: Thu Jan 01 00:00:00 1970 +0000
162 summary: add new_3_c
163
164 changeset: 4:ca819180edb9
165 parent: 1:7c3bad9141dc
166 user: test
167 date: Thu Jan 01 00:00:00 1970 +0000
168 summary: add new_2_c
169
170 changeset: 3:cdbce2fbb163
171 parent: 1:7c3bad9141dc
172 user: test
173 date: Thu Jan 01 00:00:00 1970 +0000
174 summary: add new_c
175
176 changeset: 2:245bde4270cd
177 user: test
178 date: Thu Jan 01 00:00:00 1970 +0000
179 summary: add original_c
180
138 5:5601fb93a350 (draft) [tip ] add new_3_c
139 4:ca819180edb9 (draft) [ ] add new_2_c
140 3:cdbce2fbb163 (draft) [ ] add new_c
141 2:245bde4270cd (draft) [ ] add original_c
181 142
182 143
183 144 check that summary does not report them
@@ -204,13 +165,7 check that summary does not report them
204 165 check that various commands work well with filtering
205 166
206 167 $ hg tip
207 changeset: 5:5601fb93a350
208 tag: tip
209 parent: 1:7c3bad9141dc
210 user: test
211 date: Thu Jan 01 00:00:00 1970 +0000
212 summary: add new_3_c
213
168 5:5601fb93a350 (draft) [tip ] add new_3_c
214 169 $ hg log -r 6
215 170 abort: unknown revision '6'!
216 171 [255]
@@ -222,27 +177,13 Check that public changeset are not acco
222 177
223 178 $ hg --hidden phase --public 2
224 179 $ hg log -G
225 @ changeset: 5:5601fb93a350
226 | tag: tip
227 | parent: 1:7c3bad9141dc
228 | user: test
229 | date: Thu Jan 01 00:00:00 1970 +0000
230 | summary: add new_3_c
180 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
231 181 |
232 | o changeset: 2:245bde4270cd
233 |/ user: test
234 | date: Thu Jan 01 00:00:00 1970 +0000
235 | summary: add original_c
182 | o 2:245bde4270cd (public) [ ] add original_c
183 |/
184 o 1:7c3bad9141dc (public) [ ] add b
236 185 |
237 o changeset: 1:7c3bad9141dc
238 | user: test
239 | date: Thu Jan 01 00:00:00 1970 +0000
240 | summary: add b
241 |
242 o changeset: 0:1f0dee641bb7
243 user: test
244 date: Thu Jan 01 00:00:00 1970 +0000
245 summary: add a
186 o 0:1f0dee641bb7 (public) [ ] add a
246 187
247 188
248 189 And that bumped changeset are detected
@@ -253,13 +194,7 note that the bumped changeset (5:5601fb
253 194 the public changeset
254 195
255 196 $ hg log --hidden -r 'bumped()'
256 changeset: 5:5601fb93a350
257 tag: tip
258 parent: 1:7c3bad9141dc
259 user: test
260 date: Thu Jan 01 00:00:00 1970 +0000
261 summary: add new_3_c
262
197 5:5601fb93a350 (draft) [tip ] add new_3_c
263 198
264 199 And that we can't push bumped changeset
265 200
@@ -289,27 +224,13 We need to create a clone of 5 and add a
289 224 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
290 225 $ hg log -r 'bumped()'
291 226 $ hg log -G
292 @ changeset: 6:6f9641995072
293 | tag: tip
294 | parent: 1:7c3bad9141dc
295 | user: test
296 | date: Thu Jan 01 00:00:00 1970 +0000
297 | summary: add n3w_3_c
227 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
298 228 |
299 | o changeset: 2:245bde4270cd
300 |/ user: test
301 | date: Thu Jan 01 00:00:00 1970 +0000
302 | summary: add original_c
229 | o 2:245bde4270cd (public) [ ] add original_c
230 |/
231 o 1:7c3bad9141dc (public) [ ] add b
303 232 |
304 o changeset: 1:7c3bad9141dc
305 | user: test
306 | date: Thu Jan 01 00:00:00 1970 +0000
307 | summary: add b
308 |
309 o changeset: 0:1f0dee641bb7
310 user: test
311 date: Thu Jan 01 00:00:00 1970 +0000
312 summary: add a
233 o 0:1f0dee641bb7 (public) [ ] add a
313 234
314 235
315 236
@@ -328,28 +249,10 Simple incoming test
328 249 $ cd tmpc
329 250 $ hg incoming ../tmpb
330 251 comparing with ../tmpb
331 changeset: 0:1f0dee641bb7
332 user: test
333 date: Thu Jan 01 00:00:00 1970 +0000
334 summary: add a
335
336 changeset: 1:7c3bad9141dc
337 user: test
338 date: Thu Jan 01 00:00:00 1970 +0000
339 summary: add b
340
341 changeset: 2:245bde4270cd
342 user: test
343 date: Thu Jan 01 00:00:00 1970 +0000
344 summary: add original_c
345
346 changeset: 6:6f9641995072
347 tag: tip
348 parent: 1:7c3bad9141dc
349 user: test
350 date: Thu Jan 01 00:00:00 1970 +0000
351 summary: add n3w_3_c
352
252 0:1f0dee641bb7 (public) [ ] add a
253 1:7c3bad9141dc (public) [ ] add b
254 2:245bde4270cd (public) [ ] add original_c
255 6:6f9641995072 (draft) [tip ] add n3w_3_c
353 256
354 257 Try to pull markers
355 258 (extinct changeset are excluded but marker are pushed)
@@ -426,45 +329,19 clone support
426 329 updating to branch default
427 330 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
428 331 $ hg -R clone-dest log -G --hidden
429 @ changeset: 6:6f9641995072
430 | tag: tip
431 | parent: 1:7c3bad9141dc
432 | user: test
433 | date: Thu Jan 01 00:00:00 1970 +0000
434 | summary: add n3w_3_c
435 |
436 | x changeset: 5:5601fb93a350
437 |/ parent: 1:7c3bad9141dc
438 | user: test
439 | date: Thu Jan 01 00:00:00 1970 +0000
440 | summary: add new_3_c
441 |
442 | x changeset: 4:ca819180edb9
443 |/ parent: 1:7c3bad9141dc
444 | user: test
445 | date: Thu Jan 01 00:00:00 1970 +0000
446 | summary: add new_2_c
332 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
447 333 |
448 | x changeset: 3:cdbce2fbb163
449 |/ parent: 1:7c3bad9141dc
450 | user: test
451 | date: Thu Jan 01 00:00:00 1970 +0000
452 | summary: add new_c
334 | x 5:5601fb93a350 (draft) [ ] add new_3_c
335 |/
336 | x 4:ca819180edb9 (draft) [ ] add new_2_c
337 |/
338 | x 3:cdbce2fbb163 (draft) [ ] add new_c
339 |/
340 | o 2:245bde4270cd (public) [ ] add original_c
341 |/
342 o 1:7c3bad9141dc (public) [ ] add b
453 343 |
454 | o changeset: 2:245bde4270cd
455 |/ user: test
456 | date: Thu Jan 01 00:00:00 1970 +0000
457 | summary: add original_c
458 |
459 o changeset: 1:7c3bad9141dc
460 | user: test
461 | date: Thu Jan 01 00:00:00 1970 +0000
462 | summary: add b
463 |
464 o changeset: 0:1f0dee641bb7
465 user: test
466 date: Thu Jan 01 00:00:00 1970 +0000
467 summary: add a
344 o 0:1f0dee641bb7 (public) [ ] add a
468 345
469 346 $ hg -R clone-dest debugobsolete
470 347 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
@@ -519,27 +396,13 detect outgoing obsolete and unstable
519 396
520 397
521 398 $ hg log -G
522 o changeset: 3:6f9641995072
523 | tag: tip
524 | parent: 1:7c3bad9141dc
525 | user: test
526 | date: Thu Jan 01 00:00:00 1970 +0000
527 | summary: add n3w_3_c
399 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
528 400 |
529 | o changeset: 2:245bde4270cd
530 |/ user: test
531 | date: Thu Jan 01 00:00:00 1970 +0000
532 | summary: add original_c
401 | o 2:245bde4270cd (public) [ ] add original_c
402 |/
403 o 1:7c3bad9141dc (public) [ ] add b
533 404 |
534 o changeset: 1:7c3bad9141dc
535 | user: test
536 | date: Thu Jan 01 00:00:00 1970 +0000
537 | summary: add b
538 |
539 o changeset: 0:1f0dee641bb7
540 user: test
541 date: Thu Jan 01 00:00:00 1970 +0000
542 summary: add a
405 o 0:1f0dee641bb7 (public) [ ] add a
543 406
544 407 $ hg up 'desc("n3w_3_c")'
545 408 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -547,38 +410,17 detect outgoing obsolete and unstable
547 410 $ mkcommit original_e
548 411 $ hg debugobsolete `getid original_d` -d '0 0'
549 412 $ hg log -r 'obsolete()'
550 changeset: 4:94b33453f93b
551 user: test
552 date: Thu Jan 01 00:00:00 1970 +0000
553 summary: add original_d
554
413 4:94b33453f93b (draft) [ ] add original_d
555 414 $ hg log -G -r '::unstable()'
556 @ changeset: 5:cda648ca50f5
557 | tag: tip
558 | user: test
559 | date: Thu Jan 01 00:00:00 1970 +0000
560 | summary: add original_e
415 @ 5:cda648ca50f5 (draft) [tip ] add original_e
416 |
417 x 4:94b33453f93b (draft) [ ] add original_d
561 418 |
562 x changeset: 4:94b33453f93b
563 | user: test
564 | date: Thu Jan 01 00:00:00 1970 +0000
565 | summary: add original_d
419 o 3:6f9641995072 (draft) [ ] add n3w_3_c
566 420 |
567 o changeset: 3:6f9641995072
568 | parent: 1:7c3bad9141dc
569 | user: test
570 | date: Thu Jan 01 00:00:00 1970 +0000
571 | summary: add n3w_3_c
421 o 1:7c3bad9141dc (public) [ ] add b
572 422 |
573 o changeset: 1:7c3bad9141dc
574 | user: test
575 | date: Thu Jan 01 00:00:00 1970 +0000
576 | summary: add b
577 |
578 o changeset: 0:1f0dee641bb7
579 user: test
580 date: Thu Jan 01 00:00:00 1970 +0000
581 summary: add a
423 o 0:1f0dee641bb7 (public) [ ] add a
582 424
583 425
584 426 refuse to push obsolete changeset
@@ -607,38 +449,12 Don't try to push extinct changeset
607 449 $ hg out ../tmpf
608 450 comparing with ../tmpf
609 451 searching for changes
610 changeset: 0:1f0dee641bb7
611 user: test
612 date: Thu Jan 01 00:00:00 1970 +0000
613 summary: add a
614
615 changeset: 1:7c3bad9141dc
616 user: test
617 date: Thu Jan 01 00:00:00 1970 +0000
618 summary: add b
619
620 changeset: 2:245bde4270cd
621 user: test
622 date: Thu Jan 01 00:00:00 1970 +0000
623 summary: add original_c
624
625 changeset: 3:6f9641995072
626 parent: 1:7c3bad9141dc
627 user: test
628 date: Thu Jan 01 00:00:00 1970 +0000
629 summary: add n3w_3_c
630
631 changeset: 4:94b33453f93b
632 user: test
633 date: Thu Jan 01 00:00:00 1970 +0000
634 summary: add original_d
635
636 changeset: 5:cda648ca50f5
637 tag: tip
638 user: test
639 date: Thu Jan 01 00:00:00 1970 +0000
640 summary: add original_e
641
452 0:1f0dee641bb7 (public) [ ] add a
453 1:7c3bad9141dc (public) [ ] add b
454 2:245bde4270cd (public) [ ] add original_c
455 3:6f9641995072 (draft) [ ] add n3w_3_c
456 4:94b33453f93b (draft) [ ] add original_d
457 5:cda648ca50f5 (draft) [tip ] add original_e
642 458 $ hg push ../tmpf -f # -f because be push unstable too
643 459 pushing to ../tmpf
644 460 searching for changes
@@ -658,37 +474,17 no warning displayed
658 474 Do not warn about new head when the new head is a successors of a remote one
659 475
660 476 $ hg log -G
661 @ changeset: 5:cda648ca50f5
662 | tag: tip
663 | user: test
664 | date: Thu Jan 01 00:00:00 1970 +0000
665 | summary: add original_e
477 @ 5:cda648ca50f5 (draft) [tip ] add original_e
666 478 |
667 x changeset: 4:94b33453f93b
668 | user: test
669 | date: Thu Jan 01 00:00:00 1970 +0000
670 | summary: add original_d
479 x 4:94b33453f93b (draft) [ ] add original_d
480 |
481 o 3:6f9641995072 (draft) [ ] add n3w_3_c
671 482 |
672 o changeset: 3:6f9641995072
673 | parent: 1:7c3bad9141dc
674 | user: test
675 | date: Thu Jan 01 00:00:00 1970 +0000
676 | summary: add n3w_3_c
483 | o 2:245bde4270cd (public) [ ] add original_c
484 |/
485 o 1:7c3bad9141dc (public) [ ] add b
677 486 |
678 | o changeset: 2:245bde4270cd
679 |/ user: test
680 | date: Thu Jan 01 00:00:00 1970 +0000
681 | summary: add original_c
682 |
683 o changeset: 1:7c3bad9141dc
684 | user: test
685 | date: Thu Jan 01 00:00:00 1970 +0000
686 | summary: add b
687 |
688 o changeset: 0:1f0dee641bb7
689 user: test
690 date: Thu Jan 01 00:00:00 1970 +0000
691 summary: add a
487 o 0:1f0dee641bb7 (public) [ ] add a
692 488
693 489 $ hg up -q 'desc(n3w_3_c)'
694 490 $ mkcommit obsolete_e
@@ -697,13 +493,7 Do not warn about new head when the new
697 493 $ hg outgoing ../tmpf # parasite hg outgoing testin
698 494 comparing with ../tmpf
699 495 searching for changes
700 changeset: 6:3de5eca88c00
701 tag: tip
702 parent: 3:6f9641995072
703 user: test
704 date: Thu Jan 01 00:00:00 1970 +0000
705 summary: add obsolete_e
706
496 6:3de5eca88c00 (draft) [tip ] add obsolete_e
707 497 $ hg push ../tmpf
708 498 pushing to ../tmpf
709 499 searching for changes
@@ -773,13 +563,7 Checking _enable=False warning if obsole
773 563 $ echo "obs=!" >> $HGRCPATH
774 564 $ hg log -r tip
775 565 obsolete feature not enabled but 68 markers found!
776 changeset: 68:c15e9edfca13
777 tag: tip
778 parent: 7:50c51b361e60
779 user: test
780 date: Thu Jan 01 00:00:00 1970 +0000
781 summary: add celestine
782
566 68:c15e9edfca13 (draft) [tip ] add celestine
783 567
784 568 reenable for later test
785 569
@@ -805,40 +589,19 This test issue 3805
805 589 $ hg ci --amend
806 590 $ cd ../other-issue3805
807 591 $ hg log -G
808 @ changeset: 0:193e9254ce7e
809 tag: tip
810 user: test
811 date: Thu Jan 01 00:00:00 1970 +0000
812 summary: A
592 @ 0:193e9254ce7e (draft) [tip ] A
813 593
814 594 $ hg log -G -R ../repo-issue3805
815 @ changeset: 2:3816541e5485
816 tag: tip
817 parent: -1:000000000000
818 user: test
819 date: Thu Jan 01 00:00:00 1970 +0000
820 summary: A
595 @ 2:3816541e5485 (draft) [tip ] A
821 596
822 597 $ hg incoming
823 598 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
824 599 searching for changes
825 changeset: 2:3816541e5485
826 tag: tip
827 parent: -1:000000000000
828 user: test
829 date: Thu Jan 01 00:00:00 1970 +0000
830 summary: A
831
600 2:3816541e5485 (draft) [tip ] A
832 601 $ hg incoming --bundle ../issue3805.hg
833 602 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
834 603 searching for changes
835 changeset: 2:3816541e5485
836 tag: tip
837 parent: -1:000000000000
838 user: test
839 date: Thu Jan 01 00:00:00 1970 +0000
840 summary: A
841
604 2:3816541e5485 (draft) [tip ] A
842 605 $ hg outgoing
843 606 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
844 607 searching for changes
@@ -853,13 +616,7 This test issue 3805
853 616 $ hg incoming http://localhost:$HGPORT
854 617 comparing with http://localhost:$HGPORT/
855 618 searching for changes
856 changeset: 1:3816541e5485
857 tag: tip
858 parent: -1:000000000000
859 user: test
860 date: Thu Jan 01 00:00:00 1970 +0000
861 summary: A
862
619 1:3816541e5485 (public) [tip ] A
863 620 $ hg outgoing http://localhost:$HGPORT
864 621 comparing with http://localhost:$HGPORT/
865 622 searching for changes
@@ -894,18 +651,9 Test that a local tag blocks a changeset
894 651
895 652 $ hg tag -l visible -r 0 --hidden
896 653 $ hg log -G
897 @ changeset: 2:3816541e5485
898 tag: tip
899 parent: -1:000000000000
900 user: test
901 date: Thu Jan 01 00:00:00 1970 +0000
902 summary: A
654 @ 2:3816541e5485 (draft) [tip ] A
903 655
904 x changeset: 0:193e9254ce7e
905 tag: visible
906 user: test
907 date: Thu Jan 01 00:00:00 1970 +0000
908 summary: A
656 x 0:193e9254ce7e (draft) [visible ] A
909 657
910 658 Test that removing a local tag does not cause some commands to fail
911 659
General Comments 0
You need to be logged in to leave comments. Login now