##// END OF EJS Templates
largefiles: drop --cache-largefiles again...
Mads Kiilerich -
r18980:9717a326 default
parent child Browse files
Show More
@@ -59,8 +59,6 b' the same time, then you can pull with `-'
59 If you just want to ensure that you will have the largefiles needed to
59 If you just want to ensure that you will have the largefiles needed to
60 merge or rebase with new heads that you are pulling, then you can pull
60 merge or rebase with new heads that you are pulling, then you can pull
61 with `--lfrev "head(pulled())"` flag to pre-emptively download any largefiles
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 that are new in the heads you are pulling.
62 that are new in the heads you are pulling.
65
63
66 Keep in mind that network access may now be required to update to
64 Keep in mind that network access may now be required to update to
@@ -398,14 +398,6 b' class storeprotonotcapable(Exception):'
398 def __init__(self, storetypes):
398 def __init__(self, storetypes):
399 self.storetypes = storetypes
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 def getstandinsstate(repo):
401 def getstandinsstate(repo):
410 standins = []
402 standins = []
411 matcher = getstandinmatcher(repo)
403 matcher = getstandinmatcher(repo)
@@ -730,23 +730,7 b' def overridepull(orig, ui, repo, source='
730 finally:
730 finally:
731 repo._isrebasing = False
731 repo._isrebasing = False
732 else:
732 else:
733 oldheads = lfutil.getcurrentheads(repo)
734 result = orig(ui, repo, source, **opts)
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 revspostpull = len(repo)
734 revspostpull = len(repo)
751 if opts.get('all_largefiles'):
735 if opts.get('all_largefiles'):
752 revs = []
736 revs = []
@@ -80,8 +80,6 b' def uisetup(ui):'
80 overrides.overridepull)
80 overrides.overridepull)
81 pullopt = [('', 'all-largefiles', None,
81 pullopt = [('', 'all-largefiles', None,
82 _('download all pulled versions of largefiles')),
82 _('download all pulled versions of largefiles')),
83 ('', 'cache-largefiles', None,
84 _('caches new largefiles in all pulled heads')),
85 ('', 'lfrev', [],
83 ('', 'lfrev', [],
86 _('download largefiles for these revisions'), _('REV'))]
84 _('download largefiles for these revisions'), _('REV'))]
87 entry[1].extend(pullopt)
85 entry[1].extend(pullopt)
@@ -1391,7 +1391,7 b' correctly.'
1391 Invoking status precommit hook
1391 Invoking status precommit hook
1392 M sub/large4
1392 M sub/large4
1393 # Test --cache-largefiles flag
1393 # Test --cache-largefiles flag
1394 $ hg pull --cache-largefiles ../e
1394 $ hg pull --lfrev 'heads(pulled())' ../e
1395 pulling from ../e
1395 pulling from ../e
1396 searching for changes
1396 searching for changes
1397 adding changesets
1397 adding changesets
@@ -1399,7 +1399,6 b' correctly.'
1399 adding file changes
1399 adding file changes
1400 added 2 changesets with 4 changes to 4 files (+1 heads)
1400 added 2 changesets with 4 changes to 4 files (+1 heads)
1401 (run 'hg heads' to see heads, 'hg merge' to merge)
1401 (run 'hg heads' to see heads, 'hg merge' to merge)
1402 caching largefiles for 1 heads
1403 2 largefiles cached
1402 2 largefiles cached
1404 $ hg merge
1403 $ hg merge
1405 merging sub/large4
1404 merging sub/large4
General Comments 0
You need to be logged in to leave comments. Login now