# HG changeset patch # User Augie Fackler # Date 1524253628 14400 # Node ID 8a66277136ab91acf5b2e7cceb2bbeef73f89d39 # Parent 70eb9b6b0320d894ebfad1f2bf3896d147ecbdfa cleanup: use __getitem__ instead of .changectx on localrepo diff --git a/hgsubversion/editor.py b/hgsubversion/editor.py --- 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() diff --git a/hgsubversion/replay.py b/hgsubversion/replay.py --- 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 diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- 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