Patchwork [17,of,35] convert: define norepo in command decorator

mail settings
Submitter Gregory Szorc
Date May 5, 2014, 5:51 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/4609/
State Accepted
Commit 4a54d9f1b6b6f8ec376fd321464c8d7674eeb789
Headers show


Gregory Szorc - May 5, 2014, 5:51 a.m.
# HG changeset patch
# User Gregory Szorc <>
# Date 1399266145 25200
#      Sun May 04 22:02:25 2014 -0700
# Branch stable
# Node ID 5c01db8906f896d651da9bb61fcf3d440440a9f1
# Parent  e82a4869a0b3f0b19a9d99ef7bb60a87d3c866e6
convert: define norepo in command decorator


diff --git a/hgext/convert/ b/hgext/convert/
--- a/hgext/convert/
+++ b/hgext/convert/
@@ -32,17 +32,18 @@  testedwith = 'internal'
     ('', 'splicemap', '', _('splice synthesized history into place'),
     ('', 'branchmap', '', _('change branch names while converting'),
     ('', 'branchsort', None, _('try to sort changesets by branches')),
     ('', '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.
     Accepted source formats [identifiers]:
     - Mercurial [hg]
     - CVS [cvs]
     - Darcs [darcs]
@@ -298,17 +299,17 @@  def convert(ui, src, dest=None, revmapfi
     :convert.hg.tagsbranch: branch name for tag revisions, defaults to
     :convert.hg.usebranchnames: preserve branch names. The default is
     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)
     # Main options shared with cvsps-2.1
     ('b', 'branches', [], _('only return changes on specified branches')),
     ('p', 'prefix', '', _('prefix to remove from file names')),
@@ -319,32 +320,31 @@  def debugsvnlog(ui, **opts):
     ('z', 'fuzz', 60, _('set commit time fuzz in seconds')),
     ('', 'root', '', _('specify cvsroot')),
     # Options specific to builtin cvsps
     ('', 'parents', '', _('show parent changesets')),
     ('', 'ancestors', '', _('show current changeset in ancestor branches')),
     # 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
     This command is intended as a debugging tool for the CVS to
     Mercurial converter, and can be used as a direct replacement for
     Hg debugcvsps reads the CVS rlog for current directory (or any
     named directory) in the CVS repository, and converts the log to a
     series of changesets based on matching commit log entries and
     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:'):
         if name == 'svnrev':
             return str(subversion.revsplit(rev)[2])
         elif name == 'svnpath':
             return subversion.revsplit(rev)[1]
         elif name == 'svnuuid':