hgext/largefiles/lfutil.py
changeset 24629 8dc2533f03ef
parent 24627 f33236c9b025
child 24631 2a3f24786d09
--- a/hgext/largefiles/lfutil.py	Sat Apr 04 17:19:16 2015 -0400
+++ b/hgext/largefiles/lfutil.py	Sat Apr 04 19:31:40 2015 -0400
@@ -170,6 +170,13 @@
 def storepath(repo, hash):
     return repo.join(longname, hash)
 
+def findstorepath(repo, hash):
+    '''Search through the local store path(s) to find the file for the given
+    hash.  If the file is not found, its path in the primary store is returned.
+    The return value is a tuple of (path, exists(path)).
+    '''
+    return (storepath(repo, hash), instore(repo, hash))
+
 def copyfromcache(repo, hash, filename):
     '''Copy the specified largefile from the repo or system cache to
     filename in the repository. Return true on success or false if the