diff hgext/largefiles/overrides.py @ 19472:32e502b26983 stable

largefiles: overridematch() should replace the file path instead of extending (issue3934)
author Wei, Elson <elson.wei@gmail.com>
date Wed, 24 Jul 2013 13:20:44 +0800
parents c58b6ab4c26f
children 0c626b68c5c6
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Tue Jul 23 17:28:12 2013 -0500
+++ b/hgext/largefiles/overrides.py	Wed Jul 24 13:20:44 2013 +0800
@@ -250,8 +250,10 @@
         """
         match = oldmatch(ctx, pats, opts, globbed, default)
         m = copy.copy(match)
-        standins = [lfutil.standin(f) for f in m._files]
-        m._files.extend(standins)
+        for i in range(0, len(m._files)):
+            standin = lfutil.standin(m._files[i])
+            if standin in repo[ctx.node()]:
+                m._files[i] = standin
         m._fmap = set(m._files)
         m._always = False
         origmatchfn = m.matchfn