29 |
29 |
30 def trydiff(orig, repo, revs, ctx1, ctx2, modified, added, removed, |
30 def trydiff(orig, repo, revs, ctx1, ctx2, modified, added, removed, |
31 copy, getfilectx, *args, **kwargs): |
31 copy, getfilectx, *args, **kwargs): |
32 if util.safehasattr(repo, 'narrowmatch'): |
32 if util.safehasattr(repo, 'narrowmatch'): |
33 narrowmatch = repo.narrowmatch() |
33 narrowmatch = repo.narrowmatch() |
34 modified = filter(narrowmatch, modified) |
34 modified = [f for f in modified if narrowmatch(f)] |
35 added = filter(narrowmatch, added) |
35 added = [f for f in added if narrowmatch(f)] |
36 removed = filter(narrowmatch, removed) |
36 removed = [f for f in removed if narrowmatch(f)] |
37 copy = {k: v for k, v in copy.iteritems() if narrowmatch(k)} |
37 copy = {k: v for k, v in copy.iteritems() if narrowmatch(k)} |
38 return orig(repo, revs, ctx1, ctx2, modified, added, removed, copy, |
38 return orig(repo, revs, ctx1, ctx2, modified, added, removed, copy, |
39 getfilectx, *args, **kwargs) |
39 getfilectx, *args, **kwargs) |
40 |
40 |
41 extensions.wrapfunction(patch, '_filepairs', _filepairs) |
41 extensions.wrapfunction(patch, '_filepairs', _filepairs) |