tests: remove dependence on repo.changectx()
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 03 Apr 2018 09:12:15 -0700
changeset 37304 feced1629f48
parent 37303 8823615f68a5
child 37305 611e466662af
tests: remove dependence on repo.changectx() This was one of few remaining uses of repo.changectx() in core. Differential Revision: https://phab.mercurial-scm.org/D3036
tests/test-context.py
--- a/tests/test-context.py	Tue Apr 03 08:55:49 2018 -0700
+++ b/tests/test-context.py	Tue Apr 03 09:12:15 2018 -0700
@@ -52,7 +52,7 @@
         data += 'bar\n'
     return context.memfilectx(repo, memctx, f, data, 'l' in flags, 'x' in flags)
 
-ctxa = repo.changectx(0)
+ctxa = repo[0]
 ctxb = context.memctx(repo, [ctxa.node(), None], "test diff", ["foo"],
                       getfilectx, ctxa.user(), ctxa.date())