largefiles: define norepo in command decorator
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 04 May 2014 21:11:15 -0700
changeset 21770 15d434bee41c
parent 21769 4a54d9f1b6b6
child 21771 0f3353776038
largefiles: define norepo in command decorator
hgext/largefiles/__init__.py
hgext/largefiles/lfcommands.py
--- 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