Skip to content
Snippets Groups Projects
Commit 201b202d authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

overlayrepo: handle revnum for __getitem__

In version 4.9, core Mercurial rely on having `repo[revnum]` working. So we
implement support for that in the hg-git overlay.
parent 88022951
No related branches found
No related tags found
No related merge requests found
......@@ -467,6 +467,8 @@
self.handler.repo._constructmanifest())
def __getitem__(self, n):
if isinstance(n, int):
n = self.changelog.node(n)
if n not in self.revmap:
return self.handler.repo[n]
return overlaychangectx(self, n)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment