Mercurial > hg
changeset 21769:4a54d9f1b6b6
convert: define norepo in command decorator
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 04 May 2014 22:02:25 -0700 |
parents | 16aeb28caaa6 |
children | 15d434bee41c |
files | hgext/convert/__init__.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Sun May 04 20:57:01 2014 -0700 +++ b/hgext/convert/__init__.py Sun May 04 22:02:25 2014 -0700 @@ -10,7 +10,7 @@ import convcmd import cvsps import subversion -from mercurial import cmdutil, commands, templatekw +from mercurial import cmdutil, templatekw from mercurial.i18n import _ cmdtable = {} @@ -37,7 +37,8 @@ ('', 'datesort', None, _('try to sort changesets by date')), ('', 'sourcesort', None, _('preserve source changesets order')), ('', 'closesort', None, _('try to reorder closed revisions'))], - _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')) + _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]'), + norepo=True) def convert(ui, src, dest=None, revmapfile=None, **opts): """convert a foreign SCM repository to a Mercurial one. @@ -303,7 +304,7 @@ """ return convcmd.convert(ui, src, dest, revmapfile, **opts) -@command('debugsvnlog', [], 'hg debugsvnlog') +@command('debugsvnlog', [], 'hg debugsvnlog', norepo=True) def debugsvnlog(ui, **opts): return subversion.debugsvnlog(ui, **opts) @@ -324,7 +325,8 @@ # Options that are ignored for compatibility with cvsps-2.1 ('A', 'cvs-direct', None, _('ignored for compatibility')), ], - _('hg debugcvsps [OPTION]... [PATH]...')) + _('hg debugcvsps [OPTION]... [PATH]...'), + norepo=True) def debugcvsps(ui, *args, **opts): '''create changeset information from CVS @@ -338,8 +340,6 @@ dates.''' return cvsps.debugcvsps(ui, *args, **opts) -commands.norepo += " convert debugsvnlog debugcvsps" - def kwconverted(ctx, name): rev = ctx.extra().get('convert_revision', '') if rev.startswith('svn:'):