Mercurial > hg-git
changeset 900:db308eba5251
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.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 08 May 2015 15:50:48 -0700 |
parents | 11ca21820a95 |
children | 49831f78c412 |
files | hggit/overlay.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/overlay.py Fri May 08 16:00:45 2015 -0700 +++ b/hggit/overlay.py Fri May 08 15:50:48 2015 -0700 @@ -202,10 +202,13 @@ 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']] - 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)