Patchwork [5,of,9,stable] largefiles: don't assume that .hg/largefiles/ still exists

login
register
mail settings
Submitter Mads Kiilerich
Date Feb. 26, 2013, 2:41 a.m.
Message ID <80b37590cb47f78ca225.1361846485@mk-desktop>
Download mbox | patch
Permalink /patch/1052/
State Accepted
Commit 0ac00315875f320f0df544213ba7da151027483b
Headers show

Comments

Mads Kiilerich - Feb. 26, 2013, 2:41 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1361846443 -3600
# Branch stable
# Node ID 80b37590cb47f78ca22554b678627a910c65c6b9
# Parent  87111ec96b62e837a018a753e35371afb8240aa8
largefiles: don't assume that .hg/largefiles/ still exists

It might not have been created and it might have been removed.

Patch

diff --git a/hgext/largefiles/basestore.py b/hgext/largefiles/basestore.py
--- a/hgext/largefiles/basestore.py
+++ b/hgext/largefiles/basestore.py
@@ -59,6 +59,8 @@ 
         missing = []
         ui = self.ui
 
+        util.makedirs(lfutil.storepath(self.repo, ''))
+
         at = 0
         for filename, hash in files:
             ui.progress(_('getting largefiles'), at, unit='lfile',
diff --git a/tests/test-largefiles-cache.t b/tests/test-largefiles-cache.t
--- a/tests/test-largefiles-cache.t
+++ b/tests/test-largefiles-cache.t
@@ -84,8 +84,7 @@ 
   added 1 changesets with 1 changes to 1 files
   (run 'hg update' to get a working copy)
   caching new largefiles
-  abort: *: '$TESTTMP/mirror2/.hg/largefiles/.7f7097b041ccf68cc5561e9600da4655d21c6d18.*' (glob)
-  [255]
+  1 largefiles cached
 
 #if unix-permissions