hgext/largefiles/lfutil.py
changeset 31617 1f6c932862e5
parent 31616 10561eb97c7f
child 31618 8228bc8fed8c
equal deleted inserted replaced
31616:10561eb97c7f 31617:1f6c932862e5
   367     hasher = hashlib.sha1('')
   367     hasher = hashlib.sha1('')
   368     for data in instream:
   368     for data in instream:
   369         hasher.update(data)
   369         hasher.update(data)
   370         outfile.write(data)
   370         outfile.write(data)
   371     return hasher.hexdigest()
   371     return hasher.hexdigest()
   372 
       
   373 def hashrepofile(repo, file):
       
   374     return hashfile(repo.wjoin(file))
       
   375 
   372 
   376 def hashfile(file):
   373 def hashfile(file):
   377     if not os.path.exists(file):
   374     if not os.path.exists(file):
   378         return ''
   375         return ''
   379     hasher = hashlib.sha1('')
   376     hasher = hashlib.sha1('')