D342: rebase: change "result would have 3 parent" error message (BC)

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Aug 12 12:48:20 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> rebase.py:1066
>      if set(newps) == set(oldps) and dest not in newps:
> -        # The error message is for compatibility. It's a bit misleading since
> -        # rebase is not supposed to add new parents.
> -        raise error.Abort(_('cannot use revision %d as base, '
> -                            'result would have 3 parents') % rev)
> +        raise error.Abort(_('cannot find new parents for revision %d') % rev)
>  

I feel like "Cannot rebase merge commit %d without rebasing at least one its parents" would be more specific and still be accurate.

It would be nice if we could detect the case upfront, but if we determine the destination dynamically including looking at obsmarkers, that may be difficult

REPOSITORY
  rHG Mercurial

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

To: quark, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list