( )⚙ D3370 scmutil: introduce shortesthexnodeidprefix()

This is an archive of the discontinued Mercurial Phabricator instance.

scmutil: introduce shortesthexnodeidprefix()
ClosedPublic

Authored by martinvonz on Apr 14 2018, 2:16 AM.

Details

Summary

We have scmutil.resolvehexnodeidprefix() for resolving a prefix to a
full nodeid, so it makes sense to have the inverse method next to
it. For now it just delegates to changelog.shortest(), but it will
soon also make sure it's called on the unfiltered repo, to match
resolvehexnodeidprefix().

Note that the change in show.py also makes it so the conversion from
revnum to nodeid is done on the filtered repo, but that should be
inconsequential since the revs are all from the filtered repo anyway.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Apr 14 2018, 2:16 AM
martinvonz updated this revision to Diff 8254.Apr 14 2018, 3:20 AM
This revision was automatically updated to reflect the committed changes.
martinvonz updated this revision to Diff 8285.Apr 14 2018, 12:16 PM