# HG changeset patch # User Paul Morelle # Date 1526536307 -7200 # Node ID 108d9303ef7152f14385c8982cf93457c954b766 # Parent e41773ad35842f3c6dbda7e6650f21ba8d28d1cc git_handler: use repo.__getitem__ instead of (removed) repo.changectx As stated in https://phab.mercurial-scm.org/D3037, repo.__getitem__ should be used instead of repo.changectx, which was removed. diff -r e41773ad3584 -r 108d9303ef71 hggit/git_handler.py --- a/hggit/git_handler.py Thu May 17 07:38:28 2018 +0200 +++ b/hggit/git_handler.py Thu May 17 07:51:47 2018 +0200 @@ -550,7 +550,7 @@ oldenc = self.swap_out_encoding() - ctx = self.repo.changectx(rev) + ctx = self.repo[rev] extra = ctx.extra() commit = Commit() @@ -874,7 +874,7 @@ self.git_file_readlines(git_commit_tree, '.hgsubstate')) parentsubdata = '' if gparents: - p1ctx = self.repo.changectx(gparents[0]) + p1ctx = self.repo[gparents[0]] if '.hgsubstate' in p1ctx: parentsubdata = p1ctx.filectx('.hgsubstate').data() parentsubdata = parentsubdata.splitlines() @@ -958,8 +958,8 @@ # begin with). if p2 == nullid: return [] - manifest1 = self.repo.changectx(p1).manifest() - manifest2 = self.repo.changectx(p2).manifest() + manifest1 = self.repo[p1].manifest() + manifest2 = self.repo[p2].manifest() return [path for path, node1 in manifest1.iteritems() if path not in files and manifest2.get(path, node1) != node1]