Mercurial > hg
comparison hgext/largefiles/overrides.py @ 17599:56136786000f stable
largefiles: restore caching of largefiles with 'clone -U --all-largefiles'
This was broken when restoring normal -u and -U functionality.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 09 Sep 2012 03:37:38 -0400 |
parents | b7302d65006c |
children | 3a1c6b64e052 |
comparison
equal
deleted
inserted
replaced
17598:b7302d65006c | 17599:56136786000f |
---|---|
734 branch=opts.get('branch')) | 734 branch=opts.get('branch')) |
735 if result is None: | 735 if result is None: |
736 return True | 736 return True |
737 if opts.get('all_largefiles'): | 737 if opts.get('all_largefiles'): |
738 sourcerepo, destrepo = result | 738 sourcerepo, destrepo = result |
739 success, missing = lfcommands.downloadlfiles(ui, destrepo.local(), None) | 739 repo = destrepo.local() |
740 | |
741 # The .hglf directory must exist for the standin matcher to match | |
742 # anything (which listlfiles uses for each rev), and .hg/largefiles is | |
743 # assumed to exist by the code that caches the downloaded file. These | |
744 # directories exist if clone updated to any rev. | |
745 if opts.get('noupdate'): | |
746 util.makedirs(repo.pathto(lfutil.shortname)) | |
747 util.makedirs(repo.join(lfutil.longname)) | |
748 | |
749 # Caching is implicitly limited to 'rev' option, since the dest repo was | |
750 # truncated at that point. | |
751 success, missing = lfcommands.downloadlfiles(ui, repo, None) | |
740 return missing != 0 | 752 return missing != 0 |
741 return result is None | 753 return result is None |
742 | 754 |
743 def overriderebase(orig, ui, repo, **opts): | 755 def overriderebase(orig, ui, repo, **opts): |
744 repo._isrebasing = True | 756 repo._isrebasing = True |