This is an archive of the discontinued Mercurial Phabricator instance.

shortest: never emit 0-length prefix even if unique
ClosedPublic

Authored by martinvonz on Oct 22 2018, 2:37 PM.

Details

Summary

It turned out that the pure version of our code for finding the
shortest unique nodeid prefix would return a 0-length string if that
was unique (because there was at most one revision in the
disambiguation set). That's kind of correct, but it can't be used as
input, so we shouldn't return it. Let's just adjust the given
minlength up to at least 1. This fixes test-template-functions.t,
which was failing in pure mode.

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.

Event Timeline

martinvonz created this revision.Oct 22 2018, 2:37 PM
This revision was automatically updated to reflect the committed changes.