gitlog: fix embarassing bug that prevented log from showing correct parents
authorAugie Fackler <raf@durin42.com>
Sat, 07 Mar 2020 17:42:40 -0500
changeset 44480 f19491aae641
parent 44479 7518ea76eff4
child 44481 8b5f5d8ad783
gitlog: fix embarassing bug that prevented log from showing correct parents We had the correct parents in the database, but the changelog was always returning p1 for all parents. Oops. Differential Revision: https://phab.mercurial-scm.org/D8263
hgext/git/gitlog.py
--- a/hgext/git/gitlog.py	Sat Mar 07 16:51:21 2020 -0500
+++ b/hgext/git/gitlog.py	Sat Mar 07 17:42:40 2020 -0500
@@ -274,7 +274,7 @@
             if len(c.parents) > 2:
                 raise error.Abort(b'TODO octopus merge handling')
             if len(c.parents) == 2:
-                p2 = self.rev(c.parents[0].id.raw)
+                p2 = self.rev(c.parents[1].id.raw)
         return p1, p2
 
     # Private method is used at least by the tags code.