Patchwork D3013: tests: use context-return revpair() in autodiff

login
register
mail settings
Submitter phabricator
Date April 1, 2018, 5:06 p.m.
Message ID <fd8bd6225b2c413e3ebfc5ebf9b240e6@localhost.localdomain>
Download mbox | patch
Permalink /patch/30125/
State Not Applicable
Headers show

Comments

phabricator - April 1, 2018, 5:06 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf654105f1517: tests: use context-return revpair() in autodiff (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3013?vs=7501&id=7502

REVISION DETAIL
  https://phab.mercurial-scm.org/D3013

AFFECTED FILES
  tests/autodiff.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/autodiff.py b/tests/autodiff.py
--- a/tests/autodiff.py
+++ b/tests/autodiff.py
@@ -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)