##// END OF EJS Templates
largefiles: refactor lfutil.findfiles to be more logical
Na'Tosha Bard -
r15913:c35dcde2 default
parent child Browse files
Show More
@@ -117,14 +117,14 b' def inusercache(ui, hash):'
117 def findfile(repo, hash):
117 def findfile(repo, hash):
118 if instore(repo, hash):
118 if instore(repo, hash):
119 repo.ui.note(_('Found %s in store\n') % hash)
119 repo.ui.note(_('Found %s in store\n') % hash)
120 return storepath(repo, hash)
120 elif inusercache(repo.ui, hash):
121 elif inusercache(repo.ui, hash):
121 repo.ui.note(_('Found %s in system cache\n') % hash)
122 repo.ui.note(_('Found %s in system cache\n') % hash)
122 path = storepath(repo, hash)
123 path = storepath(repo, hash)
123 util.makedirs(os.path.dirname(path))
124 util.makedirs(os.path.dirname(path))
124 link(usercachepath(repo.ui, hash), path)
125 link(usercachepath(repo.ui, hash), path)
125 else:
126 return path
126 return None
127 return None
127 return storepath(repo, hash)
128
128
129 class largefiles_dirstate(dirstate.dirstate):
129 class largefiles_dirstate(dirstate.dirstate):
130 def __getitem__(self, key):
130 def __getitem__(self, key):
General Comments 0
You need to be logged in to leave comments. Login now