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

Mads Kiilerich mads at kiilerich.com
Mon Feb 25 20:41:25 CST 2013


# HG changeset patch
# User Mads Kiilerich <madski at 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.

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
 


More information about the Mercurial-devel mailing list