# HG changeset patch # User Alexis S. L. Carvalho # Date 1173578443 10800 # Node ID da0588996ecc28e5d37fc0d4e3d945bce6bf859d # Parent 6f94740447362e7ff376f7e6145eb59d93859d2f remove obsolete code from patch.diff repo.status already does this filtering. If the caller supplies a set of changes, it's his responsibility to filter out what he doesn't want. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -466,17 +466,6 @@ def diff(repo, node1=None, node2=None, f if not changes: changes = repo.status(node1, node2, files, match=match)[:5] modified, added, removed, deleted, unknown = changes - if files: - def filterfiles(filters): - l = [x for x in filters if x in files] - - for t in files: - if not t.endswith("/"): - t += "/" - l += [x for x in filters if x.startswith(t)] - return l - - modified, added, removed = map(filterfiles, (modified, added, removed)) if not modified and not added and not removed: return