Skip to content
Snippets Groups Projects
Commit db308eba authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

overlaychangectx: use overlayrevlog logic to determine parents

The old logic was broken -- it didn't work at the boundary between hg and git
commits. The logic in overlayrevlog.parents handles that correctly.

This is the last fix required for Mercurial 3.4.
parent 11ca2182
No related branches found
No related tags found
No related merge requests found
......@@ -202,6 +202,7 @@
return self.commit.message
def parents(self):
parents = self.commit.parents
cl = self.repo.changelog
parents = cl.parents(cl.node(self._rev))
if not parents:
return [self.repo['null']]
......@@ -206,6 +207,8 @@
if not parents:
return [self.repo['null']]
return [overlaychangectx(self.repo, sha) for sha in parents]
if parents[1] == nullid:
parents = parents[:-1]
return [self.repo[sha] for sha in parents]
def manifestnode(self):
return bin(self.commit.tree)
......
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