changeset 31655:9d075911df49

largefiles: avoid meaningless changectx looking up Logically, "repo[ctx.node()]" should be equal to "ctx". In addition to it, this redundant code path is repeated "len(match.m_files)" times.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 27 Mar 2017 09:44:35 +0900
parents 1af4a1641bdb
children 0192aa8626c1
files hgext/largefiles/overrides.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Mon Mar 27 09:44:35 2017 +0900
+++ b/hgext/largefiles/overrides.py	Mon Mar 27 09:44:35 2017 +0900
@@ -365,10 +365,9 @@
             # support naming a directory on the command line with only
             # largefiles.  The original directory is kept to support normal
             # files.
-            if standin in repo[ctx.node()]:
+            if standin in ctx:
                 m._files[i] = standin
-            elif m._files[i] not in repo[ctx.node()] \
-                    and repo.wvfs.isdir(standin):
+            elif m._files[i] not in ctx and repo.wvfs.isdir(standin):
                 m._files.append(standin)
 
         m._fileroots = set(m._files)