( )⚙ D7037 context: make copies related function return None or a valid value

This is an archive of the discontinued Mercurial Phabricator instance.

context: make copies related function return None or a valid value
ClosedPublic

Authored by marmoute on Oct 9 2019, 6:43 PM.

Details

Summary

With the previous code, existing but empty value where not "decoded", leading to
the method returning one of None, some valid value (list or dict) or
b''.

On a general basis, not explicitly checking for None is a source of bugs.
Having a clean return types will help the side-data copies code in future
changesets.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

marmoute created this revision.Oct 9 2019, 6:43 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.