changeset 37258:f654105f1517

tests: use context-return revpair() in autodiff Differential Revision: https://phab.mercurial-scm.org/D3013
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 01 Apr 2018 09:30:44 -0700
parents f290f130d7fc
children d29f6fbd1181
files tests/autodiff.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/autodiff.py	Sat Mar 31 23:26:07 2018 -0700
+++ b/tests/autodiff.py	Sun Apr 01 09:30:44 2018 -0700
@@ -40,9 +40,9 @@
     else:
         raise error.Abort(b'--git must be yes, no or auto')
 
-    node1, node2 = scmutil.revpairnodes(repo, [])
-    m = scmutil.match(repo[node2], pats, opts)
-    it = patch.diff(repo, node1, node2, match=m, opts=diffopts,
+    ctx1, ctx2 = scmutil.revpair(repo, [])
+    m = scmutil.match(ctx2, pats, opts)
+    it = patch.diff(repo, ctx1.node(), ctx2.node(), match=m, opts=diffopts,
                     losedatafn=losedatafn)
     for chunk in it:
         ui.write(chunk)