This is an archive of the discontinued Mercurial Phabricator instance.

shortest: make pure code also disambigute against revnums at end
ClosedPublic

Authored by martinvonz on May 8 2018, 2:07 PM.

Details

Summary

This makes the pure code more similar to the native code in that it
first finds a prefix that's unambiguous among nodeids and then adds
hex digits until it no longer looks like a revnum. It will allow us to
even better separate the disambiguation with revnums in a later patch.

With this patch hg log -r 0::50 -T '{shortest(node,1)}' with no
native code goes from 25s to 43s. It wasn't exactly usable to begin
with, so I don't feel too bad about it.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.