History

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.

Paul Morelle committed 8 years ago

Commit e6932f21 parent 3d6e4b91 file · +4 −4Browse files

Unified · Split

hggit/git_handler.py+4−4
@@ -550,7 +550,7 @@ class GitHandler(object): · 549 unmodified lines
550550
551551 oldenc = self.swap_out_encoding()
552552
553− ctx = self.repo.changectx(rev)
553+ ctx = self.repo[rev]
554554 extra = ctx.extra()
555555
556556 commit = Commit()
@@ -874,7 +874,7 @@ class GitHandler(object): · 317 unmodified lines
874874 self.git_file_readlines(git_commit_tree, '.hgsubstate'))
875875 parentsubdata = ''
876876 if gparents:
877− p1ctx = self.repo.changectx(gparents[0])
877+ p1ctx = self.repo[gparents[0]]
878878 if '.hgsubstate' in p1ctx:
879879 parentsubdata = p1ctx.filectx('.hgsubstate').data()
880880 parentsubdata = parentsubdata.splitlines()
@@ -958,8 +958,8 @@ class GitHandler(object): · 77 unmodified lines
958958 # begin with).
959959 if p2 == nullid:
960960 return []
961− manifest1 = self.repo.changectx(p1).manifest()
962− manifest2 = self.repo.changectx(p2).manifest()
961+ manifest1 = self.repo[p1].manifest()
962+ manifest2 = self.repo[p2].manifest()
963963 return [path for path, node1 in manifest1.iteritems() if path not
964964 in files and manifest2.get(path, node1) != node1]
965965

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t