hgext/largefiles/lfutil.py
changeset 31659 0eec36112e58
parent 31657 641f3a6098d0
child 31734 44ff5e4ffc8c
--- a/hgext/largefiles/lfutil.py	Mon Mar 27 09:44:36 2017 +0900
+++ b/hgext/largefiles/lfutil.py	Mon Mar 27 09:44:36 2017 +0900
@@ -342,8 +342,11 @@
     else:
         return None
 
-def updatestandin(repo, standin):
-    lfile = splitstandin(standin)
+def updatestandin(repo, lfile, standin):
+    """Re-calculate hash value of lfile and write it into standin
+
+    This assumes that "lfutil.standin(lfile) == standin", for efficiency.
+    """
     file = repo.wjoin(lfile)
     if repo.wvfs.exists(lfile):
         hash = hashfile(file)
@@ -560,7 +563,7 @@
                     # performed and the working copy is not updated
                     # yet.
                     if repo.wvfs.exists(lfile):
-                        updatestandin(repo, fstandin)
+                        updatestandin(repo, lfile, fstandin)
 
         return match
 
@@ -586,7 +589,7 @@
     for fstandin in standins:
         lfile = splitstandin(fstandin)
         if lfdirstate[lfile] != 'r':
-            updatestandin(repo, fstandin)
+            updatestandin(repo, lfile, fstandin)
 
     # Cook up a new matcher that only matches regular files or
     # standins corresponding to the big files requested by the