diff hgext/largefiles/lfutil.py @ 31618:8228bc8fed8c

largefiles: avoid redundant standin() invocations There are some code paths, which apply standin() on same value multilpe times instead of using already standin()-ed value. "fstandin" is common name for "path to standin file" in lfutil.py, to avoid shadowing "standin()".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 24 Mar 2017 22:29:22 +0900
parents 1f6c932862e5
children d5cbbee542eb
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Fri Mar 24 22:29:22 2017 +0900
+++ b/hgext/largefiles/lfutil.py	Fri Mar 24 22:29:22 2017 +0900
@@ -557,13 +557,13 @@
         # removed/renamed)
         for lfile in lfiles:
             if lfile in modifiedfiles:
-                if repo.wvfs.exists(standin(lfile)):
+                fstandin = standin(lfile)
+                if repo.wvfs.exists(fstandin):
                     # this handles the case where a rebase is being
                     # performed and the working copy is not updated
                     # yet.
                     if repo.wvfs.exists(lfile):
-                        updatestandin(repo,
-                            standin(lfile))
+                        updatestandin(repo, fstandin)
 
         return match