Mercurial > evolve
comparison tests/test-topic.t @ 2643:a9ca94defc29
topics: rename '--change' flag to '--rev' flag
The --change flag was used to read a revset of which topic should be changed. In
mercurial we use --rev for this type of flag.
Now things will work as follows:
`hg topics topicname`: It will set the current topic
`hg topics topicname --rev revset`: Change topic of all the revs in the revset
to topicname
Further patches will try to achieve the following:
`hg topics --clear --rev revset`: clear topic from all the revisions in the
revset
`hg topics --clear`: clear the current topic (Current behavior)
`hg topics --rev revset`: show topics on the revisions in the revset
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 21 Jun 2017 02:00:01 +0530 |
parents | fd602980f7ee |
children | b5723184fc62 |
comparison
equal
deleted
inserted
replaced
2642:92e882a82aaf | 2643:a9ca94defc29 |
---|---|
20 The --verbose version of this command display various information on the | 20 The --verbose version of this command display various information on the |
21 state of each topic. | 21 state of each topic. |
22 | 22 |
23 options: | 23 options: |
24 | 24 |
25 --clear clear active topic if any | 25 --clear clear active topic if any |
26 --change VALUE revset of existing revisions to change topic | 26 -r --rev REV revset of existing revisions |
27 -l --list show the stack of changeset in the topic | 27 -l --list show the stack of changeset in the topic |
28 | 28 |
29 (some details hidden, use --verbose to show complete help) | 29 (some details hidden, use --verbose to show complete help) |
30 $ hg topics | 30 $ hg topics |
31 | 31 |
32 Test topics interaction with evolution: | 32 Test topics interaction with evolution: |
33 | 33 |
34 $ hg topics --config experimental.evolution= | 34 $ hg topics --config experimental.evolution= |
35 $ hg topics --config experimental.evolution= --change . bob | 35 $ hg topics --config experimental.evolution= --rev . bob |
36 abort: must have obsolete enabled to use --change | 36 abort: must have obsolete enabled to change topics |
37 [255] | 37 [255] |
38 | 38 |
39 Create some changes: | 39 Create some changes: |
40 | 40 |
41 $ for x in alpha beta gamma delta ; do | 41 $ for x in alpha beta gamma delta ; do |
540 | summary: start on fran | 540 | summary: start on fran |
541 | | 541 | |
542 $ hg topics | 542 $ hg topics |
543 fran | 543 fran |
544 Changing topic fails if we don't give a topic | 544 Changing topic fails if we don't give a topic |
545 $ hg topic --change 9 | 545 $ hg topic --rev 9 |
546 abort: changing topic requires a topic name or --clear | 546 abort: changing topic requires a topic name or --clear |
547 [255] | 547 [255] |
548 | 548 |
549 Can't change topic of a public change | 549 Can't change topic of a public change |
550 $ hg topic --change 1:: --clear | 550 $ hg topic --rev 1:: --clear |
551 abort: can't change topic of a public change | 551 abort: can't change topic of a public change |
552 [255] | 552 [255] |
553 | 553 |
554 Can clear topics | 554 Can clear topics |
555 $ hg topic --change 9 --clear | 555 $ hg topic --rev 9 --clear |
556 changed topic on 1 changes | 556 changed topic on 1 changes |
557 please run hg evolve --rev "not topic()" now | 557 please run hg evolve --rev "not topic()" now |
558 $ hg log -Gr 'draft() and not obsolete()' | 558 $ hg log -Gr 'draft() and not obsolete()' |
559 o changeset: 11:783930e1d79e | 559 o changeset: 11:783930e1d79e |
560 | tag: tip | 560 | tag: tip |
575 | 575 |
576 $ hg rebase -d tip -s . | 576 $ hg rebase -d tip -s . |
577 rebasing 10:4073470c35e1 "fran?" | 577 rebasing 10:4073470c35e1 "fran?" |
578 | 578 |
579 Can add a topic to an existing change | 579 Can add a topic to an existing change |
580 $ hg topic --change 11 wat | 580 $ hg topic --rev 11 wat |
581 changed topic on 1 changes | 581 changed topic on 1 changes |
582 please run hg evolve --rev "topic(wat)" now | 582 please run hg evolve --rev "topic(wat)" now |
583 $ hg log -Gr 'draft() and not obsolete()' | 583 $ hg log -Gr 'draft() and not obsolete()' |
584 o changeset: 13:d91cd8fd490e | 584 o changeset: 13:d91cd8fd490e |
585 | tag: tip | 585 | tag: tip |
649 parent: 13:d91cd8fd490e | 649 parent: 13:d91cd8fd490e |
650 user: test | 650 user: test |
651 date: Thu Jan 01 00:00:00 1970 +0000 | 651 date: Thu Jan 01 00:00:00 1970 +0000 |
652 summary: fran? | 652 summary: fran? |
653 | 653 |
654 Readding the same topic with topic --change should work: | 654 Reading the same topic with topic --rev should work: |
655 $ hg topic --change . watwat | 655 $ hg topic --rev . watwat |
656 changed topic on 1 changes | 656 changed topic on 1 changes |
657 | 657 |
658 Testing issue5441 | 658 Testing issue5441 |
659 $ hg co 19 | 659 $ hg co 19 |
660 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 660 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
673 | user: test | 673 | user: test |
674 | date: Thu Jan 01 00:00:00 1970 +0000 | 674 | date: Thu Jan 01 00:00:00 1970 +0000 |
675 | summary: start on fran | 675 | summary: start on fran |
676 | | 676 | |
677 | 677 |
678 $ hg topics --change '13::19' changewat | 678 $ hg topics --rev '13::19' changewat |
679 changed topic on 2 changes | 679 changed topic on 2 changes |
680 please run hg evolve --rev "topic(changewat)" now | 680 please run hg evolve --rev "topic(changewat)" now |
681 $ hg log -Gr 'draft()' | 681 $ hg log -Gr 'draft()' |
682 o changeset: 21:58e15a6365ca | 682 o changeset: 21:58e15a6365ca |
683 | tag: tip | 683 | tag: tip |