This is an archive of the discontinued Mercurial Phabricator instance.

revlog: use "partialmatch" on the nodemap object
AbandonedPublic

Authored by quark on Nov 16 2017, 6:10 PM.

Details

Reviewers
indygreg
Group Reviewers
hg-reviewers
Summary

Previously, partialmatch belongs to the index object. The index is
more about converting rev to node: index[rev] -> node. The nodemap
object is to convert node to rev: nodemap[node] -> rev. Since
partialmatch is to convert a prefix of node to rev, it's more related to
the nodemap object. So let's move it there logically.

This allows external code to try an alternative nodemap (and partialmatch)
implementation without touching the index object.

Since the C implementation uses a same object for both index and
nodemap, this change does not need to change any of the C code.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

quark created this revision.Nov 16 2017, 6:10 PM
quark abandoned this revision.Nov 17 2017, 4:08 AM

Actually it is hex -> node. So does not really belong to nodemap.