Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 6602:a57a27b12965
match: remove files argument from patch.diff
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:08 -0500 |
parents | 833be17000b6 |
children | 41eb20cc1c02 |
line wrap: on
line diff
--- a/mercurial/patch.py Mon May 12 11:37:08 2008 -0500 +++ b/mercurial/patch.py Mon May 12 11:37:08 2008 -0500 @@ -1152,7 +1152,7 @@ ret.append('\n') return ''.join(ret) -def diff(repo, node1=None, node2=None, files=None, match=util.always, +def diff(repo, node1=None, node2=None, match=None, fp=None, changes=None, opts=None): '''print diff of changes to files between two nodes, or node and working directory. @@ -1160,6 +1160,9 @@ if node1 is None, use first dirstate parent instead. if node2 is None, compare node1 with working directory.''' + if not match: + match = cmdutil.matchall(repo) + if opts is None: opts = mdiff.defaultopts if fp is None: @@ -1183,7 +1186,7 @@ date1 = util.datestr(ctx1.date()) if not changes: - changes = repo.status(node1, node2, files, match=match)[:5] + changes = repo.status(node1, node2, files=match.files(), match=match)[:5] modified, added, removed, deleted, unknown = changes if not modified and not added and not removed: