# HG changeset patch # User Wei, Elson # Date 1374643244 -28800 # Node ID 32e502b26983eaa89574835a024a9b035ad72bf4 # Parent fd1bb7c1be78d15a02761156bb1caaa3ccb304b6 largefiles: overridematch() should replace the file path instead of extending (issue3934) diff -r fd1bb7c1be78 -r 32e502b26983 hgext/largefiles/overrides.py --- 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 diff -r fd1bb7c1be78 -r 32e502b26983 tests/test-largefiles.t --- a/tests/test-largefiles.t Tue Jul 23 17:28:12 2013 -0500 +++ b/tests/test-largefiles.t Wed Jul 24 13:20:44 2013 +0800 @@ -738,6 +738,8 @@ large6 $ cat sub2/large7 large7 + $ hg log -qf sub2/large7 + 7:daea875e9014 $ cd .. $ hg clone a -r 3 c adding changesets