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.
--- a/hgext/largefiles/lfcommands.py Mon Jun 25 15:14:06 2012 -0700
+++ 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: