hgext/rebase.py
changeset 44666 e7af56a0733e
parent 44556 f63598aa1c4b
child 44856 b7808443ed6a
child 44923 1f114c797961
equal deleted inserted replaced
44665:e89b3603d3da 44666:e7af56a0733e
   629                 merging = p2 != nullrev
   629                 merging = p2 != nullrev
   630                 editform = cmdutil.mergeeditform(merging, b'rebase')
   630                 editform = cmdutil.mergeeditform(merging, b'rebase')
   631                 editor = cmdutil.getcommiteditor(
   631                 editor = cmdutil.getcommiteditor(
   632                     editform=editform, **pycompat.strkwargs(opts)
   632                     editform=editform, **pycompat.strkwargs(opts)
   633                 )
   633                 )
       
   634                 # We need to set parents again here just in case we're continuing
       
   635                 # a rebase started with an old hg version (before 9c9cfecd4600),
       
   636                 # because those old versions would have left us with two dirstate
       
   637                 # parents, and we don't want to create a merge commit here (unless
       
   638                 # we're rebasing a merge commit).
       
   639                 self.wctx.setparents(repo[p1].node(), repo[p2].node())
   634                 newnode = self._concludenode(rev, p1, editor)
   640                 newnode = self._concludenode(rev, p1, editor)
   635             else:
   641             else:
   636                 # Skip commit if we are collapsing
   642                 # Skip commit if we are collapsing
   637                 newnode = None
   643                 newnode = None
   638             # Update the state
   644             # Update the state