This is an archive of the discontinued Mercurial Phabricator instance.

rust-changelog: remove special parsing of empty changelog data for null rev
ClosedPublic

Authored by martinvonz on Apr 5 2022, 2:11 PM.

Details

Summary

For the null revision, Revlog::get_rev_data() will return an empty
string (of bytes). We currently handle that case in
ChangelogRevisionData::manifest_node(). However, it's going to be
ugly to have special handling for the null revision for each future
method on ChangelogRevisionData. This patch therefore restructures
the code so we instead initialize the struct with valid data for the
null revision.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

martinvonz created this revision.Apr 5 2022, 2:11 PM
Alphare accepted this revision.Apr 6 2022, 6:55 AM
This revision is now accepted and ready to land.Apr 6 2022, 6:55 AM
martinvonz retitled this revision from rhg: remove special parsing of empty changelog data for null rev to rust-changelog: remove special parsing of empty changelog data for null rev.Apr 9 2022, 1:35 AM
martinvonz updated this revision to Diff 33150.Apr 13 2022, 9:10 AM