##// END OF EJS Templates
largefiles: drop partial support for not having a user cache...
Mads Kiilerich -
r28575:78e4e558 default
parent child Browse files
Show More
@@ -55,10 +55,7 b' def usercachepath(ui, hash):'
55 55 with the given hash.
56 56 This cache is used for sharing of largefiles across repositories - both
57 57 to preserve download bandwidth and storage space.'''
58 path = _usercachedir(ui)
59 if path:
60 return os.path.join(path, hash)
61 return None
58 return os.path.join(_usercachedir(ui), hash)
62 59
63 60 def _usercachedir(ui):
64 61 '''Return the location of the "global" largefiles cache.'''
@@ -82,11 +79,11 b' def _usercachedir(ui):'
82 79 return os.path.join(home, '.cache', longname)
83 80 else:
84 81 raise error.Abort(_('unknown operating system: %s\n') % os.name)
85 return None
82 raise error.Abort(_('unknown %s usercache location\n') % longname)
86 83
87 84 def inusercache(ui, hash):
88 85 path = usercachepath(ui, hash)
89 return path and os.path.exists(path)
86 return os.path.exists(path)
90 87
91 88 def findfile(repo, hash):
92 89 path, exists = findstorepath(repo, hash)
@@ -261,8 +258,7 b' def copytostoreabsolute(repo, file, hash'
261 258
262 259 def linktousercache(repo, hash):
263 260 path = usercachepath(repo.ui, hash)
264 if path:
265 link(storepath(repo, hash), path)
261 link(storepath(repo, hash), path)
266 262
267 263 def getstandinmatcher(repo, rmatcher=None):
268 264 '''Return a match object that applies rmatcher to the standin directory'''
General Comments 0
You need to be logged in to leave comments. Login now