largefiles: reduce redundant splitstandin/standin combination
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 06 Feb 2012 12:16:29 +0900
changeset 16075 d2e8e79a6361
parent 16074 67a5bc8aeb1d
child 16076 e7701459fb42
largefiles: reduce redundant splitstandin/standin combination assumptions: - 'lfutil.splitstandin(f)' strips 'f' of '.hglf/', if it can - 'lfile(f)' examines 'lfutil.standin(f) in manifest' - 'lfutil.standin(f)' adds '.hglf/' to 'f' and - 'f' should start with '.hglf/' there, because it is already examined by 'lfutil.isstandin(f)' then: lfile(lfutil.splitstandin(f)) => lfile(<f without '.hglf/'>) => lfutil.standin(<f without '.hglf/'>) in manifest => <<f without '.hglf/'> with '.hglf/'> in manifest => f in manifest
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Mon Feb 06 12:16:29 2012 +0900
+++ b/hgext/largefiles/overrides.py	Mon Feb 06 12:16:29 2012 +0900
@@ -454,7 +454,7 @@
                 m._fmap = set(m._files)
                 orig_matchfn = m.matchfn
                 m.matchfn = lambda f: (lfutil.isstandin(f) and
-                                    lfile(lfutil.splitstandin(f)) and
+                                    (f in manifest) and
                                     orig_matchfn(lfutil.splitstandin(f)) or
                                     None)
                 return m