[PATCH 2 of 2 STABLE] largefiles: reduce redundant splitstandin/standin combination

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Mon Feb 6 03:22:31 UTC 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1328498189 -32400
# Branch stable
# Node ID 923570653ada90991800bab650dd35494e172326
# Parent  66b2efef53f57f17bd50ebbe4e0c7d548b19bc68
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

diff -r 66b2efef53f5 -r 923570653ada 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



More information about the Mercurial-devel mailing list