658 repo._isrebasing = False |
658 repo._isrebasing = False |
659 else: |
659 else: |
660 repo.lfpullsource = source |
660 repo.lfpullsource = source |
661 if not source: |
661 if not source: |
662 source = 'default' |
662 source = 'default' |
|
663 oldheads = lfutil.getcurrentheads(repo) |
663 result = orig(ui, repo, source, **opts) |
664 result = orig(ui, repo, source, **opts) |
664 # If we do not have the new largefiles for any new heads we pulled, we |
665 # If we do not have the new largefiles for any new heads we pulled, we |
665 # will run into a problem later if we try to merge or rebase with one of |
666 # will run into a problem later if we try to merge or rebase with one of |
666 # these heads, so cache the largefiles now direclty into the system |
667 # these heads, so cache the largefiles now direclty into the system |
667 # cache. |
668 # cache. |
668 ui.status(_("caching new largefiles\n")) |
669 ui.status(_("caching new largefiles\n")) |
669 numcached = 0 |
670 numcached = 0 |
670 branches = repo.branchmap() |
671 heads = lfutil.getcurrentheads(repo) |
671 for branch in branches: |
672 newheads = set(heads).difference(set(oldheads)) |
672 heads = repo.branchheads(branch) |
673 for head in newheads: |
673 for head in heads: |
674 (cached, missing) = lfcommands.cachelfiles(ui, repo, head) |
674 (cached, missing) = lfcommands.cachelfiles(ui, repo, head) |
675 numcached += len(cached) |
675 numcached += len(cached) |
|
676 ui.status(_("%d largefiles cached\n" % numcached)) |
676 ui.status(_("%d largefiles cached\n" % numcached)) |
677 return result |
677 return result |
678 |
678 |
679 def override_rebase(orig, ui, repo, **opts): |
679 def override_rebase(orig, ui, repo, **opts): |
680 repo._isrebasing = True |
680 repo._isrebasing = True |