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.
--- a/hgext/largefiles/lfutil.py Tue Apr 16 00:40:21 2013 +0200
+++ b/hgext/largefiles/lfutil.py Mon Apr 15 23:31:56 2013 +0200
@@ -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 @@
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):