mercurial/merge.py
changeset 43798 32d11a23c9cf
parent 43797 fb07126dadbe
child 44060 a61287a95dc3
equal deleted inserted replaced
43797:fb07126dadbe 43798:32d11a23c9cf
  2624         pother = nullid
  2624         pother = nullid
  2625         parents = ctx.parents()
  2625         parents = ctx.parents()
  2626         if keepparent and len(parents) == 2 and base in parents:
  2626         if keepparent and len(parents) == 2 and base in parents:
  2627             parents.remove(base)
  2627             parents.remove(base)
  2628             pother = parents[0].node()
  2628             pother = parents[0].node()
       
  2629     # Never set both parents equal to each other
       
  2630     if pother == pctx.node():
       
  2631         pother = nullid
  2629 
  2632 
  2630     with repo.dirstate.parentchange():
  2633     with repo.dirstate.parentchange():
  2631         repo.setparents(pctx.node(), pother)
  2634         repo.setparents(pctx.node(), pother)
  2632         repo.dirstate.write(repo.currenttransaction())
  2635         repo.dirstate.write(repo.currenttransaction())
  2633         # fix up dirstate for copies and renames
  2636         # fix up dirstate for copies and renames