Patchwork [18,of,35] largefiles: define norepo in command decorator

login
register
mail settings
Submitter Gregory Szorc
Date May 5, 2014, 5:51 a.m.
Message ID <aecdc36b9f715454721f.1399269083@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/4608/
State Accepted
Commit 15d434bee41c2e7060692886dc7ad0cb118d4f39
Headers show

Comments

Gregory Szorc - May 5, 2014, 5:51 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1399263075 25200
#      Sun May 04 21:11:15 2014 -0700
# Branch stable
# Node ID aecdc36b9f715454721fe015b9cfd96d573bca79
# Parent  5c01db8906f896d651da9bb61fcf3d440440a9f1
largefiles: define norepo in command decorator

Patch

diff --git a/hgext/largefiles/__init__.py b/hgext/largefiles/__init__.py
--- a/hgext/largefiles/__init__.py
+++ b/hgext/largefiles/__init__.py
@@ -120,11 +120,9 @@  def featuresetup(ui, supported):
     # don't die on seeing a repo with the largefiles requirement
     supported |= set(['largefiles'])
 
 def uisetup(ui):
     localrepo.localrepository.featuresetupfuncs.add(featuresetup)
     hg.wirepeersetupfuncs.append(proto.wirereposetup)
     uisetupmod.uisetup(ui)
 
-commands.norepo += " lfconvert"
-
 cmdtable = lfcommands.cmdtable
diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py
+++ b/hgext/largefiles/lfcommands.py
@@ -27,17 +27,18 @@  command = cmdutil.command(cmdtable)
 commands.inferrepo += " lfconvert"
 
 @command('lfconvert',
     [('s', 'size', '',
       _('minimum size (MB) for files to be converted as largefiles'), 'SIZE'),
     ('', '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
 
     Convert repository SOURCE to a new repository DEST, identical to
     SOURCE except that certain files will be converted as largefiles:
     specifically, any file that matches any PATTERN *or* whose size is
     above the minimum size threshold is converted as a largefile. The
     size used to determine whether or not to track a file as a