changeset 1565:8a66277136ab

cleanup: use __getitem__ instead of .changectx on localrepo
author Augie Fackler <raf@durin42.com>
date Fri, 20 Apr 2018 15:47:08 -0400
parents 70eb9b6b0320
children c28c757ffe16
files hgsubversion/editor.py hgsubversion/replay.py hgsubversion/stupid.py
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/editor.py
+++ b/hgsubversion/editor.py
@@ -202,7 +202,7 @@ class HgEditor(svnwrap.Editor):
         # A mapping of file paths to batons
         self._openpaths = {}
         self._deleted = set()
-        self._getctx = hgutil.lrucachefunc(self.repo.changectx)
+        self._getctx = hgutil.lrucachefunc(self.repo.__getitem__)
         # A map from directory baton to path
         self._opendirs = {}
         self._missing = set()
--- a/hgsubversion/replay.py
+++ b/hgsubversion/replay.py
@@ -144,7 +144,7 @@ def _convert_rev(ui, meta, svn, r, tbdel
                 and not files):
                 continue
 
-        parentctx = meta.repo.changectx(parents[0])
+        parentctx = meta.repo[parents[0]]
         if tag:
             if parentctx.node() == node.nullid:
                 continue
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -374,7 +374,7 @@ def makecopyfinder(meta, r, branchpath):
         changeid = meta.get_parent_revision(svnrev + 1, branch, True)
         ctx = None
         if changeid != revlog.nullid:
-            ctx = meta.repo.changectx(changeid)
+            ctx = meta.repo[changeid]
         ctxs[svnrev] = ctx
         return ctx