hgext/largefiles/lfutil.py
changeset 16928 73b9286e667c
parent 16247 d87d9d8a8e03
child 17270 32246faba53a
equal deleted inserted replaced
16927:7922004a46b8 16928:73b9286e667c
   113     path = usercachepath(ui, hash)
   113     path = usercachepath(ui, hash)
   114     return path and os.path.exists(path)
   114     return path and os.path.exists(path)
   115 
   115 
   116 def findfile(repo, hash):
   116 def findfile(repo, hash):
   117     if instore(repo, hash):
   117     if instore(repo, hash):
   118         repo.ui.note(_('Found %s in store\n') % hash)
   118         repo.ui.note(_('found %s in store\n') % hash)
   119         return storepath(repo, hash)
   119         return storepath(repo, hash)
   120     elif inusercache(repo.ui, hash):
   120     elif inusercache(repo.ui, hash):
   121         repo.ui.note(_('Found %s in system cache\n') % hash)
   121         repo.ui.note(_('found %s in system cache\n') % hash)
   122         path = storepath(repo, hash)
   122         path = storepath(repo, hash)
   123         util.makedirs(os.path.dirname(path))
   123         util.makedirs(os.path.dirname(path))
   124         link(usercachepath(repo.ui, hash), path)
   124         link(usercachepath(repo.ui, hash), path)
   125         return path
   125         return path
   126     return None
   126     return None