This is an archive of the discontinued Mercurial Phabricator instance.

cmdutil: add allowunfinished to prevent checkunfinished() on docommit()
Needs RevisionPublic

Authored by navaneeth.suresh on Jul 26 2019, 8:51 AM.

Details

Reviewers
pulkit
Group Reviewers
hg-reviewers
Summary

cmdutil.dorecord() has a checkunfinished() function call. We might not
want to do that on certain occasions. For example, unshelve --continue
on interactive mode is trying to create a commit during an existing
unfinished state.

We are now allowing that case using an option interactive-unshelve.
However, there should be a general way to do that. This patch adds
a allowunfinished optional argument to the cmdutil.dorecord()
function and make unshelve to migrate to this argument by removing
the interactive-unshelve option.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit added a subscriber: pulkit.Jul 26 2019, 9:00 AM
pulkit added inline comments.
mercurial/cmdutil.py
274

Why not get rid of interactive-shelve passed by unshelve and make that pass allowunfinished=True to dorecord?

mercurial/cmdutil.py
274

I thought of splitting into two patches. Will be amending the changes soon in this patch itself.

navaneeth.suresh edited the summary of this revision. (Show Details)Jul 26 2019, 9:05 AM
navaneeth.suresh updated this revision to Diff 16073.
navaneeth.suresh marked an inline comment as done.Jul 26 2019, 9:06 AM
pulkit accepted this revision.Jul 29 2019, 5:41 AM

cmdutil: add allowunfinished to prevent checkunfinished() on docommit()

s/docommit/dorecord/ in flight

This revision is now accepted and ready to land.Jul 29 2019, 5:41 AM

test-commit-interactive.t and some other tests fail for me with this, can you have a look?

In D6697#98061, @pulkit wrote:

test-commit-interactive.t and some other tests fail for me with this, can you have a look?

Doing that right away!

pulkit requested changes to this revision.Aug 7 2019, 6:20 PM

The test still fails.

This revision now requires changes to proceed.Aug 7 2019, 6:20 PM