[PATCH V2] largefiles: optimize status by synchronizing lfdirstate with the largefile on update
Na'Tosha Bard
natosha at unity3d.com
Fri Jul 13 07:50:10 CDT 2012
# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1342183756 -7200
# Node ID 127eddbc5f62f2b32a3fd57bbe7ca33c28b77dc0
# Parent c496de2ce56316d9adf3820473f68e29438a1a5f
largefiles: optimize status by synchronizing lfdirstate with the largefile on update
This speeds up status on a largefiles repo by synchronizing the largefiles dirstate to the
largefile's mtime upon update, preventing the files from coming back as "unsure" later,
requiring a check of the SHA1 sum.
diff -r c496de2ce563 -r 127eddbc5f62 hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py Wed Jul 11 11:41:38 2012 +0200
+++ b/hgext/largefiles/lfcommands.py Fri Jul 13 14:49:16 2012 +0200
@@ -483,6 +483,10 @@
# recognition that such cache missing files are REMOVED.
lfdirstate.normallookup(lfile)
return None # don't try to set the mode
+ else:
+ # Synchronize largefile dirstate to the last modified time of
+ # the file
+ lfdirstate.normal(lfile)
ret = 1
mode = os.stat(absstandin).st_mode
if mode != os.stat(abslfile).st_mode:
More information about the Mercurial-devel
mailing list