comparison hgext/largefiles/lfcommands.py @ 15230:697289c5d415

largefiles: improve help Extension help taken from the URL formerly in the text (https://developers.kilnhg.com/Repo/Kiln/largefiles/largefiles/File/usage.txt) and improved.
author Greg Ward <greg@gerg.ca>
date Tue, 11 Oct 2011 21:10:03 -0400
parents ee625de3541e
children 6e809bb4f969
comparison
equal deleted inserted replaced
15229:89e19ca2a90e 15230:697289c5d415
18 import basestore 18 import basestore
19 19
20 # -- Commands ---------------------------------------------------------- 20 # -- Commands ----------------------------------------------------------
21 21
22 def lfconvert(ui, src, dest, *pats, **opts): 22 def lfconvert(ui, src, dest, *pats, **opts):
23 '''Convert a normal repository to a largefiles repository 23 '''convert a normal repository to a largefiles repository
24 24
25 Convert source repository creating an identical repository, except that all 25 Convert repository SOURCE to a new repository DEST, identical to
26 files that match the patterns given, or are over the given size will be 26 SOURCE except that certain files will be converted as largefiles:
27 added as largefiles. The size used to determine whether or not to track a 27 specifically, any file that matches any PATTERN *or* whose size is
28 file as a largefile is the size of the first version of the file. After 28 above the minimum size threshold is converted as a largefile. The
29 running this command you will need to make sure that largefiles is enabled 29 size used to determine whether or not to track a file as a
30 anywhere you intend to push the new repository.''' 30 largefile is the size of the first version of the file. The
31 minimum size can be specified either with --size or in
32 configuration as ``largefiles.size``.
33
34 After running this command you will need to make sure that
35 largefiles is enabled anywhere you intend to push the new
36 repository.
37
38 Use --tonormal to convert largefiles back to normal files; after
39 this, the DEST repository can be used without largefiles at all.'''
31 40
32 if opts['tonormal']: 41 if opts['tonormal']:
33 tolfile = False 42 tolfile = False
34 else: 43 else:
35 tolfile = True 44 tolfile = True
462 # -- hg commands declarations ------------------------------------------------ 471 # -- hg commands declarations ------------------------------------------------
463 472
464 473
465 cmdtable = { 474 cmdtable = {
466 'lfconvert': (lfconvert, 475 'lfconvert': (lfconvert,
467 [('s', 'size', '', 'All files over this size (in megabytes) ' 476 [('s', 'size', '',
468 'will be considered largefiles. This can also be specified ' 477 _('minimum size (MB) for files to be converted '
469 'in your hgrc as [largefiles].size.'), 478 'as largefiles'),
470 ('','tonormal',False, 479 'SIZE'),
471 'Convert from a largefiles repo to a normal repo')], 480 ('', 'tonormal', False,
481 _('convert from a largefiles repo to a normal repo')),
482 ],
472 _('hg lfconvert SOURCE DEST [FILE ...]')), 483 _('hg lfconvert SOURCE DEST [FILE ...]')),
473 } 484 }