Show More
@@ -21,6 +21,18 b' import basestore' | |||
|
21 | 21 | |
|
22 | 22 | # -- Commands ---------------------------------------------------------- |
|
23 | 23 | |
|
24 | cmdtable = {} | |
|
25 | command = cmdutil.command(cmdtable) | |
|
26 | ||
|
27 | commands.inferrepo += " lfconvert" | |
|
28 | ||
|
29 | @command('lfconvert', | |
|
30 | [('s', 'size', '', | |
|
31 | _('minimum size (MB) for files to be converted as largefiles'), 'SIZE'), | |
|
32 | ('', 'to-normal', False, | |
|
33 | _('convert from a largefiles repo to a normal repo')), | |
|
34 | ], | |
|
35 | _('hg lfconvert SOURCE DEST [FILE ...]')) | |
|
24 | 36 | def lfconvert(ui, src, dest, *pats, **opts): |
|
25 | 37 | '''convert a normal repository to a largefiles repository |
|
26 | 38 | |
@@ -519,6 +531,10 b' def updatelfiles(ui, repo, filelist=None' | |||
|
519 | 531 | finally: |
|
520 | 532 | wlock.release() |
|
521 | 533 | |
|
534 | @command('lfpull', | |
|
535 | [('r', 'rev', [], _('pull largefiles for these revisions')) | |
|
536 | ] + commands.remoteopts, | |
|
537 | _('-r REV... [-e CMD] [--remotecmd CMD] [SOURCE]')) | |
|
522 | 538 | def lfpull(ui, repo, source="default", **opts): |
|
523 | 539 | """pull largefiles for the specified revisions from the specified source |
|
524 | 540 | |
@@ -553,24 +569,3 b' def lfpull(ui, repo, source="default", *' | |||
|
553 | 569 | (cached, missing) = cachelfiles(ui, repo, rev) |
|
554 | 570 | numcached += len(cached) |
|
555 | 571 | ui.status(_("%d largefiles cached\n") % numcached) |
|
556 | ||
|
557 | # -- hg commands declarations ------------------------------------------------ | |
|
558 | ||
|
559 | cmdtable = { | |
|
560 | 'lfconvert': (lfconvert, | |
|
561 | [('s', 'size', '', | |
|
562 | _('minimum size (MB) for files to be converted ' | |
|
563 | 'as largefiles'), | |
|
564 | 'SIZE'), | |
|
565 | ('', 'to-normal', False, | |
|
566 | _('convert from a largefiles repo to a normal repo')), | |
|
567 | ], | |
|
568 | _('hg lfconvert SOURCE DEST [FILE ...]')), | |
|
569 | 'lfpull': (lfpull, | |
|
570 | [('r', 'rev', [], _('pull largefiles for these revisions')) | |
|
571 | ] + commands.remoteopts, | |
|
572 | _('-r REV... [-e CMD] [--remotecmd CMD] [SOURCE]') | |
|
573 | ), | |
|
574 | } | |
|
575 | ||
|
576 | commands.inferrepo += " lfconvert" |
General Comments 0
You need to be logged in to leave comments.
Login now