Patchwork D3036: tests: remove dependence on repo.changectx()

login
register
mail settings
Submitter phabricator
Date April 3, 2018, 4:14 p.m.
Message ID <differential-rev-PHID-DREV-6i7gk22gkfb7ovh6lukp-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30173/
State Superseded
Headers show

Comments

phabricator - April 3, 2018, 4:14 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was one of few remaining uses of repo.changectx() in core.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-context.py

CHANGE DETAILS




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

Patch

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