largefiles: don't hash all largefiles when initializing a lfdirstate
authorMads Kiilerich <madski@unity3d.com>
Mon, 15 Apr 2013 23:31:56 +0200
changeset 19010 e071d161b266
parent 19009 07e40d589b64
child 19011 12acbea17625
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.
hgext/largefiles/lfutil.py
--- 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):