Show More
@@ -59,8 +59,6 b' the same time, then you can pull with `-' | |||
|
59 | 59 | If you just want to ensure that you will have the largefiles needed to |
|
60 | 60 | merge or rebase with new heads that you are pulling, then you can pull |
|
61 | 61 | with `--lfrev "head(pulled())"` flag to pre-emptively download any largefiles |
|
62 | that are new in the heads you are pulling. You can also pull with the | |
|
63 | `--cache-largefiles` flag to pre-emptively download any largefiles | |
|
64 | 62 | that are new in the heads you are pulling. |
|
65 | 63 | |
|
66 | 64 | Keep in mind that network access may now be required to update to |
@@ -398,14 +398,6 b' class storeprotonotcapable(Exception):' | |||
|
398 | 398 | def __init__(self, storetypes): |
|
399 | 399 | self.storetypes = storetypes |
|
400 | 400 | |
|
401 | def getcurrentheads(repo): | |
|
402 | branches = repo.branchmap() | |
|
403 | heads = [] | |
|
404 | for branch in branches: | |
|
405 | newheads = repo.branchheads(branch) | |
|
406 | heads = heads + newheads | |
|
407 | return heads | |
|
408 | ||
|
409 | 401 | def getstandinsstate(repo): |
|
410 | 402 | standins = [] |
|
411 | 403 | matcher = getstandinmatcher(repo) |
@@ -730,23 +730,7 b' def overridepull(orig, ui, repo, source=' | |||
|
730 | 730 | finally: |
|
731 | 731 | repo._isrebasing = False |
|
732 | 732 | else: |
|
733 | oldheads = lfutil.getcurrentheads(repo) | |
|
734 | 733 | result = orig(ui, repo, source, **opts) |
|
735 | if opts.get('cache_largefiles'): | |
|
736 | # If you are pulling from a remote location that is not your | |
|
737 | # default location, you may want to cache largefiles for new heads | |
|
738 | # that have been pulled, so you can easily merge or rebase with | |
|
739 | # them later | |
|
740 | numcached = 0 | |
|
741 | heads = lfutil.getcurrentheads(repo) | |
|
742 | newheads = set(heads).difference(set(oldheads)) | |
|
743 | if len(newheads) > 0: | |
|
744 | ui.status(_("caching largefiles for %s heads\n") % | |
|
745 | len(newheads)) | |
|
746 | for head in newheads: | |
|
747 | (cached, missing) = lfcommands.cachelfiles(ui, repo, head) | |
|
748 | numcached += len(cached) | |
|
749 | ui.status(_("%d largefiles cached\n") % numcached) | |
|
750 | 734 | revspostpull = len(repo) |
|
751 | 735 | if opts.get('all_largefiles'): |
|
752 | 736 | revs = [] |
@@ -80,8 +80,6 b' def uisetup(ui):' | |||
|
80 | 80 | overrides.overridepull) |
|
81 | 81 | pullopt = [('', 'all-largefiles', None, |
|
82 | 82 | _('download all pulled versions of largefiles')), |
|
83 | ('', 'cache-largefiles', None, | |
|
84 | _('caches new largefiles in all pulled heads')), | |
|
85 | 83 | ('', 'lfrev', [], |
|
86 | 84 | _('download largefiles for these revisions'), _('REV'))] |
|
87 | 85 | entry[1].extend(pullopt) |
@@ -1391,7 +1391,7 b' correctly.' | |||
|
1391 | 1391 | Invoking status precommit hook |
|
1392 | 1392 | M sub/large4 |
|
1393 | 1393 | # Test --cache-largefiles flag |
|
1394 |
$ hg pull -- |
|
|
1394 | $ hg pull --lfrev 'heads(pulled())' ../e | |
|
1395 | 1395 | pulling from ../e |
|
1396 | 1396 | searching for changes |
|
1397 | 1397 | adding changesets |
@@ -1399,7 +1399,6 b' correctly.' | |||
|
1399 | 1399 | adding file changes |
|
1400 | 1400 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
1401 | 1401 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1402 | caching largefiles for 1 heads | |
|
1403 | 1402 | 2 largefiles cached |
|
1404 | 1403 | $ hg merge |
|
1405 | 1404 | merging sub/large4 |
General Comments 0
You need to be logged in to leave comments.
Login now