Mercurial > hg-stable
changeset 18981:83ead8cb0ff2
largefiles: implement pull --all-largefiles as a special case of --lfrev
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 15 Apr 2013 01:59:11 +0200 |
parents | 9717a326d270 |
children | 43cb150e74f9 |
files | hgext/largefiles/overrides.py tests/test-largefiles.t |
diffstat | 2 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Mon Apr 15 01:59:11 2013 +0200 +++ b/hgext/largefiles/overrides.py Mon Apr 15 01:59:11 2013 +0200 @@ -732,12 +732,9 @@ else: result = orig(ui, repo, source, **opts) revspostpull = len(repo) + lfrevs = opts.get('lfrev', []) if opts.get('all_largefiles'): - revs = [] - for rev in xrange(revsprepull, revspostpull): - revs.append(repo[rev].rev()) - lfcommands.downloadlfiles(ui, repo, revs) - lfrevs = opts.get('lfrev', []) + lfrevs.append('pulled()') if lfrevs and revspostpull > revsprepull: numcached = 0 repo.firstpulled = revsprepull # for pulled() revset expression
--- a/tests/test-largefiles.t Mon Apr 15 01:59:11 2013 +0200 +++ b/tests/test-largefiles.t Mon Apr 15 01:59:11 2013 +0200 @@ -911,7 +911,7 @@ adding file changes added 6 changesets with 16 changes to 8 files (run 'hg update' to get a working copy) - 6 additional largefiles cached + 6 largefiles cached redo pull with --lfrev and check it pulls largefiles for the right revs @@ -1002,7 +1002,7 @@ M sub/normal4 M sub2/large6 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) - 0 additional largefiles cached + 0 largefiles cached nothing to rebase $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ] $ hg log --template '{rev}:{node|short} {desc|firstline}\n' @@ -1361,7 +1361,6 @@ pulling from $TESTTMP/d (glob) searching for changes no changes found - 0 additional largefiles cached Merging does not revert to old versions of largefiles and also check that merging after having pulled from a non-default remote works