--- a/hgext3rd/topic/__init__.py Wed Jun 21 01:05:46 2017 +0530
+++ b/hgext3rd/topic/__init__.py Wed Jun 21 02:00:01 2017 +0530
@@ -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')