##// END OF EJS Templates
largefiles: introduce readasstandin() to read hex hash from given filectx...
FUJIWARA Katsunori -
r31734:44ff5e4f default
parent child Browse files
Show More
@@ -355,10 +355,16 b' def updatestandin(repo, lfile, standin):'
355 else:
355 else:
356 raise error.Abort(_('%s: file not found!') % lfile)
356 raise error.Abort(_('%s: file not found!') % lfile)
357
357
358 def readasstandin(fctx):
359 '''read hex hash from given filectx of standin file
360
361 This encapsulates how "standin" data is stored into storage layer.'''
362 return fctx.data().strip()
363
358 def readstandin(repo, filename, node=None):
364 def readstandin(repo, filename, node=None):
359 '''read hex hash from standin for filename at given node, or working
365 '''read hex hash from standin for filename at given node, or working
360 directory if no node is given'''
366 directory if no node is given'''
361 return repo[node][standin(filename)].data().strip()
367 return readasstandin(repo[node][standin(filename)])
362
368
363 def writestandin(repo, standin, hash, executable):
369 def writestandin(repo, standin, hash, executable):
364 '''write hash to <repo.root>/<standin>'''
370 '''write hash to <repo.root>/<standin>'''
General Comments 0
You need to be logged in to leave comments. Login now