diff -r 44be33cf7a57 -r 2c14bf83b58b mercurial/merge.py --- a/mercurial/merge.py Tue Sep 17 15:35:16 2019 -0700 +++ b/mercurial/merge.py Thu Sep 19 07:50:24 2019 +0900 @@ -2257,7 +2257,7 @@ pother = nullid parents = ctx.parents() if keepparent and len(parents) == 2 and pctx in parents: - if pctx == parents[0]: + if pctx == parents[1]: potherp1 = True parents.remove(pctx) pother = parents[0].node()