mercurial/patch.py
changeset 6602 a57a27b12965
parent 6532 833be17000b6
child 6603 41eb20cc1c02
--- 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: