diff 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
line wrap: on
line diff
--- a/tests/test-topic.t	Wed Jun 21 01:05:46 2017 +0530
+++ b/tests/test-topic.t	Wed Jun 21 02:00:01 2017 +0530
@@ -22,9 +22,9 @@
   
   options:
   
-      --clear        clear active topic if any
-      --change VALUE revset of existing revisions to change topic
-   -l --list         show the stack of changeset in the topic
+      --clear   clear active topic if any
+   -r --rev REV revset of existing revisions
+   -l --list    show the stack of changeset in the topic
   
   (some details hidden, use --verbose to show complete help)
   $ hg topics
@@ -32,8 +32,8 @@
 Test topics interaction with evolution:
 
   $ hg topics --config experimental.evolution=
-  $ hg topics --config experimental.evolution= --change . bob
-  abort: must have obsolete enabled to use --change
+  $ hg topics --config experimental.evolution= --rev . bob
+  abort: must have obsolete enabled to change topics
   [255]
 
 Create some changes:
@@ -542,17 +542,17 @@
   $ hg topics
      fran
 Changing topic fails if we don't give a topic
-  $ hg topic --change 9
+  $ hg topic --rev 9
   abort: changing topic requires a topic name or --clear
   [255]
 
 Can't change topic of a public change
-  $ hg topic --change 1:: --clear
+  $ hg topic --rev 1:: --clear
   abort: can't change topic of a public change
   [255]
 
 Can clear topics
-  $ hg topic --change 9 --clear
+  $ hg topic --rev 9 --clear
   changed topic on 1 changes
   please run hg evolve --rev "not topic()" now
   $ hg log -Gr 'draft() and not obsolete()'
@@ -577,7 +577,7 @@
   rebasing 10:4073470c35e1 "fran?"
 
 Can add a topic to an existing change
-  $ hg topic --change 11 wat
+  $ hg topic --rev 11 wat
   changed topic on 1 changes
   please run hg evolve --rev "topic(wat)" now
   $ hg log -Gr 'draft() and not obsolete()'
@@ -651,8 +651,8 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     fran?
   
-Readding the same topic with topic --change should work:
-  $ hg topic --change . watwat
+Reading the same topic with topic --rev should work:
+  $ hg topic --rev . watwat
   changed topic on 1 changes
 
 Testing issue5441
@@ -675,7 +675,7 @@
   |  summary:     start on fran
   |
 
-  $ hg topics --change '13::19' changewat
+  $ hg topics --rev '13::19' changewat
   changed topic on 2 changes
   please run hg evolve --rev "topic(changewat)" now
   $ hg log -Gr 'draft()'