[PATCH 13 of 13] largefiles: don't hash all largefiles when initializing a lfdirstate
Mads Kiilerich
mads at kiilerich.com
Tue Apr 16 02:43:30 UTC 2013
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1366061516 -7200
# Mon Apr 15 23:31:56 2013 +0200
# Node ID df6735f5a539ad0d04c79422aaa3d1519bffee4f
# Parent ec0eedc2dd147693b0e7f1560dfaa46ded744761
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.
diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -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):
More information about the Mercurial-devel
mailing list