Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/overrides.py @ 16692:b9969574540a
largefiles: add --all-largefiles flag to pull
author | Na'Tosha Bard <natosha@unity3d.com> |
---|---|
date | Sat, 12 May 2012 11:45:22 +0200 |
parents | 7d6a660ca151 |
children | 68da5ae6e470 |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Sat May 12 09:59:01 2012 +0200 +++ b/hgext/largefiles/overrides.py Sat May 12 11:45:22 2012 +0200 @@ -651,6 +651,7 @@ # take some extra care so that the largefiles are correctly updated in the # working copy def overridepull(orig, ui, repo, source=None, **opts): + revsprepull = len(repo) if opts.get('rebase', False): repo._isrebasing = True try: @@ -660,7 +661,6 @@ 'the update flag\n') del opts['rebase'] cmdutil.bailifchanged(repo) - revsprepull = len(repo) origpostincoming = commands.postincoming def _dummy(*args, **kwargs): pass @@ -695,6 +695,12 @@ (cached, missing) = lfcommands.cachelfiles(ui, repo, head) numcached += len(cached) ui.status(_("%d largefiles cached\n") % numcached) + if opts.get('all_largefiles'): + revspostpull = len(repo) + revs = [] + for rev in xrange(revsprepull + 1, revspostpull): + revs.append(repo[rev].rev()) + lfcommands.downloadlfiles(ui, repo, revs) return result def overrideclone(orig, ui, source, dest=None, **opts):