Patchwork [09,of,10] largefiles: implement pull --all-largefiles as a special case of --lfrev

login
register
mail settings
Submitter Mads Kiilerich
Date April 15, 2013, 7:24 p.m.
Message ID <2f37882b3dccd6a1c81b.1366053842@mk-desktop>
Download mbox | patch
Permalink /patch/1327/
State Accepted
Commit 83ead8cb0ff2dadd79572566139a570595925be9
Headers show

Comments

Mads Kiilerich - April 15, 2013, 7:24 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1365983951 -7200
#      Mon Apr 15 01:59:11 2013 +0200
# Node ID 2f37882b3dccd6a1c81b3ef163225b1e10641fb8
# Parent  5c221de811c4b51bf1b212cf0a49cdf06c4f8d02
largefiles: implement pull --all-largefiles as a special case of --lfrev

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -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
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -883,7 +883,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
 
@@ -974,7 +974,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'
@@ -1333,7 +1333,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