( )⚙ D3657 graft: store user passed date and user information in graftstate

This is an archive of the discontinued Mercurial Phabricator instance.

graft: store user passed date and user information in graftstate
ClosedPublic

Authored by pulkit on May 25 2018, 4:51 PM.

Details

Summary

Right now, hg help graft says:

The -c/--continue option does not reapply earlier options, except for --force.

which should be treated as a bug.

A good user experience is that the commands remember the arguments passed
initially and preserve them during hg graft --continue.

This patch starts storing the user and date information in graftstate if user
passed it. Upcoming patches will make sure we preserve that information during
--continue and them don't allow user to pass any new arguments with --continue.

I don't think there is any another --continue flag which allows new options to
be passed with it.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.May 25 2018, 4:51 PM
indygreg accepted this revision.May 25 2018, 5:08 PM
indygreg added a subscriber: indygreg.

I'm assuming we don't need to bump the state version since the new state file format is still relatively new. But if we had shipped the new state file in a release, I would insist on bumping the state version any time new data is added to state.

This revision is now accepted and ready to land.May 25 2018, 5:08 PM

I'm assuming we don't need to bump the state version since the new state file format is still relatively new. But if we had shipped the new state file in a release, I would insist on bumping the state version any time new data is added to state.

Yes I agree. The new state file format has not been part of any release, so no need to bump it. Once I finish coding work, I will add a wiki page on how to use these state files and when to bump the version.

This revision was automatically updated to reflect the committed changes.