Patchwork D8263: gitlog: fix embarassing bug that prevented log from showing correct parents

login
register
mail settings
Submitter phabricator
Date March 7, 2020, 10:45 p.m.
Message ID <differential-rev-PHID-DREV-y2jdtzblknnrvposd4iv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45613/
State Superseded
Headers show

Comments

phabricator - March 7, 2020, 10:45 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We had the correct parents in the database, but the changelog was
  always returning p1 for all parents. Oops.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8263

AFFECTED FILES
  hgext/git/gitlog.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py
--- a/hgext/git/gitlog.py
+++ b/hgext/git/gitlog.py
@@ -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.