hgext/largefiles/overrides.py
branchstable
changeset 17599 56136786000f
parent 17598 b7302d65006c
child 17600 3a1c6b64e052
--- a/hgext/largefiles/overrides.py	Sat Sep 08 13:31:06 2012 -0400
+++ b/hgext/largefiles/overrides.py	Sun Sep 09 03:37:38 2012 -0400
@@ -736,7 +736,19 @@
         return True
     if opts.get('all_largefiles'):
         sourcerepo, destrepo = result
-        success, missing = lfcommands.downloadlfiles(ui, destrepo.local(), None)
+        repo = destrepo.local()
+
+        # The .hglf directory must exist for the standin matcher to match
+        # anything (which listlfiles uses for each rev), and .hg/largefiles is
+        # assumed to exist by the code that caches the downloaded file.  These
+        # directories exist if clone updated to any rev.
+        if opts.get('noupdate'):
+            util.makedirs(repo.pathto(lfutil.shortname))
+            util.makedirs(repo.join(lfutil.longname))
+
+        # Caching is implicitly limited to 'rev' option, since the dest repo was
+        # truncated at that point.
+        success, missing = lfcommands.downloadlfiles(ui, repo, None)
         return missing != 0
     return result is None