diff tests/autodiff.py @ 14671:35c2cc322ba8

scmutil: switch match users to supplying contexts The most appropriate context is not always clearly defined. The obvious cases: For working directory commands, we use None For commands (eg annotate) with single revs, we use that revision The less obvious cases: For commands (eg status, diff) with a pair of revs, we use the second revision For commands that take a range (like log), we use None
author Matt Mackall <mpm@selenic.com>
date Sat, 18 Jun 2011 16:52:51 -0500
parents a90131b85fd8
children a08775ec89f2
line wrap: on
line diff
--- a/tests/autodiff.py	Sat Jun 18 16:52:51 2011 -0500
+++ b/tests/autodiff.py	Sat Jun 18 16:52:51 2011 -0500
@@ -29,7 +29,7 @@
         raise util.Abort('--git must be yes, no or auto')
 
     node1, node2 = scmutil.revpair(repo, [])
-    m = scmutil.match(repo, pats, opts)
+    m = scmutil.match(repo[node2], pats, opts)
     it = patch.diff(repo, node1, node2, match=m, opts=diffopts,
                     losedatafn=losedatafn)
     for chunk in it: