changeset 1267:b0633406c07a

Fix diff command so it doesn't walk the dirstate unnecessarily.
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 16 Sep 2005 14:50:06 -0700
parents 703783bc09c4
children 5e9816decbb7
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Sep 16 14:01:03 2005 -0700
+++ b/mercurial/commands.py	Fri Sep 16 14:50:06 2005 -0700
@@ -920,14 +920,9 @@
     if len(revs) > 2:
         raise util.Abort("too many revisions to diff")
 
-    files = []
-    match = util.always
-    if pats:
-        roots, match, results = makewalk(repo, pats, opts)
-        for src, abs, rel, exact in results:
-            files.append(abs)
+    fns, matchfn, anypats = matchpats(repo, repo.getcwd(), pats, opts)
 
-    dodiff(sys.stdout, ui, repo, node1, node2, files, match=match,
+    dodiff(sys.stdout, ui, repo, node1, node2, fns, match=matchfn,
            text=opts['text'])
 
 def doexport(ui, repo, changeset, seqno, total, revwidth, opts):