Mercurial > hg-git
changeset 1127:108d9303ef71
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.
author | Paul Morelle <paul.morelle@octobus.net> |
---|---|
date | Thu, 17 May 2018 07:51:47 +0200 |
parents | e41773ad3584 |
children | 6141895a53c9 |
files | hggit/git_handler.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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]