largefiles: don't hash all largefiles when initializing a lfdirstate

The largefiles will be hashed on demand if necessary ... and sometimes it isn't
necessary.
This commit is contained in:
Mads Kiilerich 2013-04-15 23:31:56 +02:00
parent 9a6bd8ef12
commit 9c2c68a468

View File

@ -9,7 +9,6 @@
'''largefiles utility code: must not import other modules in this package.'''
import os
import errno
import platform
import shutil
import stat
@ -127,14 +126,7 @@ def openlfdirstate(ui, repo, create=True):
matcher = getstandinmatcher(repo)
for standin in repo.dirstate.walk(matcher, [], False, False):
lfile = splitstandin(standin)
hash = readstandin(repo, lfile)
lfdirstate.normallookup(lfile)
try:
if hash == hashfile(repo.wjoin(lfile)):
lfdirstate.normal(lfile)
except OSError, err:
if err.errno != errno.ENOENT:
raise
return lfdirstate
def lfdirstatestatus(lfdirstate, repo, rev):