Mercurial > public > mercurial-scm > hg
diff hgext/largefiles/lfcommands.py @ 41061:98681293c890
largefiles: port commands to exthelper
One subtle change here is that the purge, rebase and transplant extensions are
wrapped in extsetup() instead of uisetup().
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 23 Dec 2018 17:26:25 -0500 |
parents | 9fcf8084ada8 |
children | 0bd56c291359 |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Sun Dec 23 21:54:56 2018 -0500 +++ b/hgext/largefiles/lfcommands.py Sun Dec 23 17:26:25 2018 -0500 @@ -20,12 +20,12 @@ cmdutil, context, error, + exthelper, hg, lock, match as matchmod, node, pycompat, - registrar, scmutil, util, ) @@ -44,10 +44,9 @@ # -- Commands ---------------------------------------------------------- -cmdtable = {} -command = registrar.command(cmdtable) +eh = exthelper.exthelper() -@command('lfconvert', +@eh.command('lfconvert', [('s', 'size', '', _('minimum size (MB) for files to be converted as largefiles'), 'SIZE'), ('', 'to-normal', False, @@ -560,7 +559,7 @@ statuswriter(_('%d largefiles updated, %d removed\n') % (updated, removed)) -@command('lfpull', +@eh.command('lfpull', [('r', 'rev', [], _('pull largefiles for these revisions')) ] + cmdutil.remoteopts, _('-r REV... [-e CMD] [--remotecmd CMD] [SOURCE]')) @@ -599,7 +598,7 @@ numcached += len(cached) ui.status(_("%d largefiles cached\n") % numcached) -@command('debuglfput', +@eh.command('debuglfput', [] + cmdutil.remoteopts, _('FILE')) def debuglfput(ui, repo, filepath, **kwargs):