This is an archive of the discontinued Mercurial Phabricator instance.

rebase: use rewriteutil.precheck() instead of reimplementing it
ClosedPublic

Authored by martinvonz on Dec 17 2019, 2:36 PM.

Details

Summary

After this patch, there's still another place in rebase.py, in the
--stop code path, that reimplements rewriteutil.precheck(). I
couldn't fix that place because it rewriteutil.precheck() checks
that there is only one dirstate parent, which fails because we have
two parents at that point. I think it's incorrect that rebase leaves
the user with two parents during conflicts, but changing that is way
of of scope for this series.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Dec 17 2019, 2:36 PM
pulkit accepted this revision.Dec 18 2019, 1:14 AM
This revision is now accepted and ready to land.Dec 18 2019, 1:14 AM
yuja added a subscriber: yuja.Dec 18 2019, 10:11 AM
  • hint=_(b'use --keep to keep original changesets'),
  • )

+ if not self.keepf:
+ try:
+ rewriteutil.precheck(self.repo, rebaseset, action=b'rebase')
+ except error.Abort as e:
+ if e.hint is None:
+ e.hint = b'use --keep to keep original changesets'

Missed _()?