This is an archive of the discontinued Mercurial Phabricator instance.

obsstore: refactor v1 logic to fix 32 byte hash support
ClosedPublic

Authored by joerg.sonnenberger on Jul 23 2020, 2:34 PM.

Details

Summary

Refactor the v1 logic to determine the node parsing based on the flag.
Move the predecessor out of the fixed part and handle it like the other
nodes, removing most of the duplicated code for parsing 20/32 bytes
hashes.

Diff Detail

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

Event Timeline

@marmoute this is something you know more about.

Alphare accepted this revision.Sep 10 2020, 4:15 AM
Alphare added a subscriber: Alphare.

Other than my "nit but please do it" comment, this looks fine.

mercurial/obsolete.py
414

I would add a comment explaining the magic 1

pulkit accepted this revision.Sep 16 2020, 3:32 AM
This revision is now accepted and ready to land.Sep 16 2020, 3:32 AM