comparison hgext/largefiles/lfcommands.py @ 21785:a730b002c5db

largefiles: define inferrepo in command decorator
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 May 2014 22:23:45 -0700
parents 15d434bee41c
children 21a2f31f054d
comparison
equal deleted inserted replaced
21784:44efd5b9ce45 21785:a730b002c5db
22 # -- Commands ---------------------------------------------------------- 22 # -- Commands ----------------------------------------------------------
23 23
24 cmdtable = {} 24 cmdtable = {}
25 command = cmdutil.command(cmdtable) 25 command = cmdutil.command(cmdtable)
26 26
27 commands.inferrepo += " lfconvert"
28
29 @command('lfconvert', 27 @command('lfconvert',
30 [('s', 'size', '', 28 [('s', 'size', '',
31 _('minimum size (MB) for files to be converted as largefiles'), 'SIZE'), 29 _('minimum size (MB) for files to be converted as largefiles'), 'SIZE'),
32 ('', 'to-normal', False, 30 ('', 'to-normal', False,
33 _('convert from a largefiles repo to a normal repo')), 31 _('convert from a largefiles repo to a normal repo')),
34 ], 32 ],
35 _('hg lfconvert SOURCE DEST [FILE ...]'), 33 _('hg lfconvert SOURCE DEST [FILE ...]'),
36 norepo=True) 34 norepo=True,
35 inferrepo=True)
37 def lfconvert(ui, src, dest, *pats, **opts): 36 def lfconvert(ui, src, dest, *pats, **opts):
38 '''convert a normal repository to a largefiles repository 37 '''convert a normal repository to a largefiles repository
39 38
40 Convert repository SOURCE to a new repository DEST, identical to 39 Convert repository SOURCE to a new repository DEST, identical to
41 SOURCE except that certain files will be converted as largefiles: 40 SOURCE except that certain files will be converted as largefiles: