@@ -255,30 +255,30 @@
@command('topics [TOPIC]', [
('', 'clear', False, 'clear active topic if any'),
- ('', 'change', '', 'revset of existing revisions to change topic'),
+ ('r', 'rev', '', 'revset of existing revisions', _('REV')),
('l', 'list', False, 'show the stack of changeset in the topic'),
] + commands.formatteropts)
-def topics(ui, repo, topic='', clear=False, change=None, list=False, **opts):
+def topics(ui, repo, topic='', clear=False, rev=None, list=False, **opts):
"""View current topic, set current topic, or see all topics.
The --verbose version of this command display various information on the state of each topic."""
if list:
- if clear or change:
- raise error.Abort(_("cannot use --clear or --change with --list"))
+ if clear or rev:
+ raise error.Abort(_("cannot use --clear or --rev with --list"))
if not topic:
topic = repo.currenttopic
if not topic:
raise error.Abort(_('no active topic to list'))
return stack.showstack(ui, repo, topic, opts)
- if change:
+ if rev:
if not obsolete.isenabled(repo, obsolete.createmarkersopt):
- raise error.Abort(_('must have obsolete enabled to use --change'))
+ raise error.Abort(_('must have obsolete enabled to change topics'))
if not topic and not clear:
raise error.Abort('changing topic requires a topic name or --clear')
- if any(not c.mutable() for c in repo.set('%r and public()', change)):
+ if any(not c.mutable() for c in repo.set('%r and public()', rev)):
raise error.Abort("can't change topic of a public change")
- _changetopics(ui, repo, change, topic, clear)
+ _changetopics(ui, repo, rev, topic, clear)
if clear:
if repo.vfs.exists('topic'):
repo.vfs.unlink('topic')
@@ -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()'