( )⚙ D2855 graft: add a version number to the state file formats

This is an archive of the discontinued Mercurial Phabricator instance.

graft: add a version number to the state file formats
AbandonedPublic

Authored by pulkit on Mar 14 2018, 4:55 AM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Adding version number to state file formats can help us in preventing an older
mercurial try to read a newer graft state file which can cause issues.
Moreover, the version numbers can help in lot of other ways also.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Mar 14 2018, 4:55 AM
pulkit updated this revision to Diff 7108.Mar 19 2018, 9:29 AM
yuja added a subscriber: yuja.Mar 27 2018, 9:12 AM

Perhaps the version shouldn't be in the CBOR data structure, because future
state file might not be a superset of CBOR.

pulkit abandoned this revision.Jun 14 2018, 4:13 PM
In D2855#47833, @yuja wrote:

Perhaps the version shouldn't be in the CBOR data structure, because future
state file might not be a superset of CBOR.

That was a very nice suggestion. Thanks!

Abandoning since it's not required anymore because now by default, state.cmdstate() write version numbers in plain text.