changeset 21770:15d434bee41c

largefiles: define norepo in command decorator
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 May 2014 21:11:15 -0700
parents 4a54d9f1b6b6
children 0f3353776038
files hgext/largefiles/__init__.py hgext/largefiles/lfcommands.py
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/__init__.py	Sun May 04 22:02:25 2014 -0700
+++ b/hgext/largefiles/__init__.py	Sun May 04 21:11:15 2014 -0700
@@ -105,7 +105,7 @@
 command.
 '''
 
-from mercurial import commands, hg, localrepo
+from mercurial import hg, localrepo
 
 import lfcommands
 import proto
@@ -125,6 +125,4 @@
     hg.wirepeersetupfuncs.append(proto.wirereposetup)
     uisetupmod.uisetup(ui)
 
-commands.norepo += " lfconvert"
-
 cmdtable = lfcommands.cmdtable
--- a/hgext/largefiles/lfcommands.py	Sun May 04 22:02:25 2014 -0700
+++ b/hgext/largefiles/lfcommands.py	Sun May 04 21:11:15 2014 -0700
@@ -32,7 +32,8 @@
     ('', 'to-normal', False,
      _('convert from a largefiles repo to a normal repo')),
     ],
-    _('hg lfconvert SOURCE DEST [FILE ...]'))
+    _('hg lfconvert SOURCE DEST [FILE ...]'),
+    norepo=True)
 def lfconvert(ui, src, dest, *pats, **opts):
     '''convert a normal repository to a largefiles repository