This is an archive of the discontinued Mercurial Phabricator instance.

amend: error out if the note is greater than 255bytes
ClosedPublic

Authored by pulkit on Oct 18 2017, 6:11 PM.

Details

Summary

In obsmarker we can't store keys and values of more than 255 bytes in metadata.
If we try to do so, ProgrammingError is raised. The note flag to amend stores
the note in obsmetadata. If a user will try to store a larger note, he will
encounter ProgrammingError which is wrong. We must error out early.

Thanks to Yuya for warning about this.

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

pulkit created this revision.Oct 18 2017, 6:11 PM
durin42 accepted this revision.Oct 18 2017, 6:14 PM
This revision is now accepted and ready to land.Oct 18 2017, 6:14 PM
This revision was automatically updated to reflect the committed changes.