From patchwork Mon May 5 05:51:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [18,of,35] largefiles: define norepo in command decorator From: Gregory Szorc X-Patchwork-Id: 4608 Message-Id: To: mercurial-devel@selenic.com Date: Sun, 04 May 2014 22:51:23 -0700 # HG changeset patch # User Gregory Szorc # Date 1399263075 25200 # Sun May 04 21:11:15 2014 -0700 # Branch stable # Node ID aecdc36b9f715454721fe015b9cfd96d573bca79 # Parent 5c01db8906f896d651da9bb61fcf3d440440a9f1 largefiles: define norepo in command decorator 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