comparison tests/test-topic.t @ 3060:f43a310c4338

topics: show changesetcount, troubledcount and headscount by default
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 13 Oct 2017 10:18:52 +0530
parents 5c8d5f980f49
children 8feb2cae7eae
comparison
equal deleted inserted replaced
3059:02b220984b01 3060:f43a310c4338
130 HG: changed alpha 130 HG: changed alpha
131 abort: empty commit message 131 abort: empty commit message
132 [255] 132 [255]
133 $ hg revert alpha 133 $ hg revert alpha
134 $ hg topic 134 $ hg topic
135 * topicflag 135 * topicflag (0 changesets)
136 136
137 Make a topic 137 Make a topic
138 138
139 $ hg topic narf 139 $ hg topic narf
140 $ hg topics 140 $ hg topics
141 * narf 141 * narf (0 changesets)
142 $ hg topics -v 142 $ hg topics -v
143 * narf (on branch: default, 0 changesets) 143 * narf (on branch: default, 0 changesets)
144 $ hg stack 144 $ hg stack
145 ### topic: narf 145 ### topic: narf
146 ### target: default (branch) 146 ### target: default (branch)
155 $ hg co .^ 155 $ hg co .^
156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
157 $ hg topic fran 157 $ hg topic fran
158 marked working directory as topic: fran 158 marked working directory as topic: fran
159 $ hg topics 159 $ hg topics
160 * fran 160 * fran (0 changesets)
161 narf 161 narf (1 changesets)
162 $ hg topics --current 162 $ hg topics --current
163 fran 163 fran
164 $ echo >> fran work >> beta 164 $ echo >> fran work >> beta
165 $ hg ci -m 'start on fran' 165 $ hg ci -m 'start on fran'
166 active topic 'fran' grew its first changeset 166 active topic 'fran' grew its first changeset
167 $ hg co narf 167 $ hg co narf
168 switching to topic narf 168 switching to topic narf
169 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 169 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 $ hg topic 170 $ hg topic
171 fran 171 fran (1 changesets)
172 * narf 172 * narf (1 changesets)
173 $ hg log -r . -T '{topics}\n' 173 $ hg log -r . -T '{topics}\n'
174 narf 174 narf
175 $ echo 'narf!!!' >> alpha 175 $ echo 'narf!!!' >> alpha
176 $ hg ci -m 'narf!' 176 $ hg ci -m 'narf!'
177 $ hg log -G 177 $ hg log -G
371 | date: Thu Jan 01 00:00:00 1970 +0000 371 | date: Thu Jan 01 00:00:00 1970 +0000
372 | summary: start on narf 372 | summary: start on narf
373 | 373 |
374 374
375 $ hg topics 375 $ hg topics
376 * query 376 * query (1 changesets)
377 $ cd ../pinky 377 $ cd ../pinky
378 $ hg co query 378 $ hg co query
379 switching to topic query 379 switching to topic query
380 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 380 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
381 $ echo answer >> alpha 381 $ echo answer >> alpha
390 $ hg resolve -m alpha 390 $ hg resolve -m alpha
391 (no more unresolved files) 391 (no more unresolved files)
392 $ hg topic narf 392 $ hg topic narf
393 $ hg ci -m 'Finish narf' 393 $ hg ci -m 'Finish narf'
394 $ hg topics 394 $ hg topics
395 fran 395 fran (1 changesets)
396 * narf 396 * narf (2 changesets)
397 query 397 query (2 changesets)
398 $ hg debugnamecomplete # branch:topic here is a buggy side effect 398 $ hg debugnamecomplete # branch:topic here is a buggy side effect
399 default 399 default
400 default:fran 400 default:fran
401 default:narf 401 default:narf
402 default:query 402 default:query
409 409
410 POSSIBLE BUG: narf topic stays alive even though we just made all 410 POSSIBLE BUG: narf topic stays alive even though we just made all
411 narf commits public: 411 narf commits public:
412 412
413 $ hg topics 413 $ hg topics
414 fran 414 fran (1 changesets)
415 * narf 415 * narf (0 changesets)
416 $ hg log -Gl 6 416 $ hg log -Gl 6
417 @ changeset: 9:ae074045b7a7 417 @ changeset: 9:ae074045b7a7
418 |\ tag: tip 418 |\ tag: tip
419 | | parent: 8:54c943c1c167 419 | | parent: 8:54c943c1c167
420 | | parent: 6:7c34953036d6 420 | | parent: 6:7c34953036d6
452 | summary: start on narf 452 | summary: start on narf
453 | 453 |
454 454
455 $ cd ../brain 455 $ cd ../brain
456 $ hg topics 456 $ hg topics
457 * query 457 * query (1 changesets)
458 $ hg pull ../pinky -r narf 458 $ hg pull ../pinky -r narf
459 pulling from ../pinky 459 pulling from ../pinky
460 abort: unknown revision 'narf'! 460 abort: unknown revision 'narf'!
461 [255] 461 [255]
462 $ hg pull ../pinky -r default 462 $ hg pull ../pinky -r default
467 adding file changes 467 adding file changes
468 added 3 changesets with 3 changes to 1 files 468 added 3 changesets with 3 changes to 1 files
469 active topic 'query' is now empty 469 active topic 'query' is now empty
470 (run 'hg update' to get a working copy) 470 (run 'hg update' to get a working copy)
471 $ hg topics 471 $ hg topics
472 * query 472 * query (0 changesets)
473 473
474 We can pull in the draft-phase change and we get the new topic 474 We can pull in the draft-phase change and we get the new topic
475 475
476 $ hg pull ../pinky 476 $ hg pull ../pinky
477 pulling from ../pinky 477 pulling from ../pinky
480 adding manifests 480 adding manifests
481 adding file changes 481 adding file changes
482 added 1 changesets with 1 changes to 1 files (+1 heads) 482 added 1 changesets with 1 changes to 1 files (+1 heads)
483 (run 'hg heads' to see heads) 483 (run 'hg heads' to see heads)
484 $ hg topics 484 $ hg topics
485 fran 485 fran (1 changesets)
486 * query 486 * query (0 changesets)
487 $ hg log -Gr 'draft()' 487 $ hg log -Gr 'draft()'
488 o changeset: 9:0469d521db49 488 o changeset: 9:0469d521db49
489 | tag: tip 489 | tag: tip
490 | topic: fran 490 | topic: fran
491 | parent: 3:a53952faf762 491 | parent: 3:a53952faf762
498 disappear: 498 disappear:
499 499
500 $ hg topics --clear 500 $ hg topics --clear
501 clearing empty topic "query" 501 clearing empty topic "query"
502 $ hg topics 502 $ hg topics
503 fran 503 fran (1 changesets)
504 504
505 Topic revset 505 Topic revset
506 $ hg log -r 'topic()' -G 506 $ hg log -r 'topic()' -G
507 o changeset: 9:0469d521db49 507 o changeset: 9:0469d521db49
508 | tag: tip 508 | tag: tip
585 | summary: start on fran 585 | summary: start on fran
586 | 586 |
587 587
588 Match current topic: 588 Match current topic:
589 $ hg topic 589 $ hg topic
590 fran 590 fran (1 changesets)
591 $ hg log -r 'topic(.)' 591 $ hg log -r 'topic(.)'
592 (no output is expected) 592 (no output is expected)
593 $ hg co fran 593 $ hg co fran
594 switching to topic fran 594 switching to topic fran
595 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 595 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
603 summary: start on fran 603 summary: start on fran
604 604
605 605
606 Deactivate the topic. 606 Deactivate the topic.
607 $ hg topics 607 $ hg topics
608 * fran 608 * fran (1 changesets)
609 $ hg topics --clear 609 $ hg topics --clear
610 $ echo fran? >> beta 610 $ echo fran? >> beta
611 $ hg ci -m 'fran?' 611 $ hg ci -m 'fran?'
612 created new head 612 created new head
613 $ hg log -Gr 'draft()' 613 $ hg log -Gr 'draft()'
624 | date: Thu Jan 01 00:00:00 1970 +0000 624 | date: Thu Jan 01 00:00:00 1970 +0000
625 | summary: start on fran 625 | summary: start on fran
626 | 626 |
627 627
628 $ hg topics 628 $ hg topics
629 fran 629 fran (1 changesets)
630 630
631 Testing for updating to t0 631 Testing for updating to t0
632 ========================== 632 ==========================
633 633
634 $ hg up fran 634 $ hg up fran
643 $ hg up t0 643 $ hg up t0
644 preserving the current topic 'fran' 644 preserving the current topic 'fran'
645 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 645 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
646 646
647 $ hg topic 647 $ hg topic
648 * fran 648 * fran (1 changesets)
649 $ hg stack 649 $ hg stack
650 ### topic: fran 650 ### topic: fran
651 ### target: default (branch), ambigious rebase destination - branch 'default' has 2 heads 651 ### target: default (branch), ambigious rebase destination - branch 'default' has 2 heads
652 t1: start on fran 652 t1: start on fran
653 t0^ Add file delta (base) 653 t0^ Add file delta (base)
728 user: test 728 user: test
729 date: Thu Jan 01 00:00:00 1970 +0000 729 date: Thu Jan 01 00:00:00 1970 +0000
730 summary: added a 730 summary: added a
731 731
732 $ hg topics 732 $ hg topics
733 topic1970 733 topic1970 (1 changesets)
734 topic1990 734 topic1990 (1 changesets)
735 * topic2010 735 * topic2010 (1 changesets)
736 736
737 $ hg topics --age 737 $ hg topics --age
738 * topic2010 (2010-01-01 by bar) 738 * topic2010 (2010-01-01 by bar)
739 topic1990 (1990-01-01 by foo) 739 topic1990 (1990-01-01 by foo)
740 topic1970 (1970-01-01 by test) 740 topic1970 (1970-01-01 by test)