Changeset 0c921ab7f3c3…
Parent 636f153cfcb1…
by Andrew Pritchard <andrewp@fogcreek.com>
Changes to one file · Browse files at 0c921ab7f3c3 Showing diff from parent 636f153cfcb1 Diff from another changeset...
@@ -191,7 +191,7 @@ matcher = getstandinmatcher(repo)
for standin in dirstate_walk(repo.dirstate, matcher):
bigfile = splitstandin(standin)
- hash = readstandin(repo, standin)
+ hash = readstandin(repo, bigfile)
try:
curhash = hashfile(bigfile)
except IOError, err:
@@ -253,7 +253,7 @@ return repo.join(os.path.join(longname, hash))
def copytocache(repo, rev, file, uploaded=False):
- hash = readstandin(repo, standin(file))
+ hash = readstandin(repo, file)
if incache(repo, hash):
return
copytocacheabsolute(repo, repo.wjoin(file), hash)
@@ -353,9 +353,10 @@ executable = getexecutable(file)
writestandin(repo, standin, hash, executable)
-def readstandin(repo, standin):
- '''read hex hash from <repo.root>/<standin>'''
- return readhash(repo.wjoin(standin))
+def readstandin(repo, filename, node=None):
+ '''read hex hash from standin for filename at given node, or working
+ directory if no node is given'''
+ return repo[node][standin(filename)].data().strip()
def writestandin(repo, standin, hash, executable):
'''write hhash to <repo.root>/<standin>'''
|
Loading...