Mercurial > hg
comparison mercurial/lock.py @ 20371:6f3fb6a974e0
template: fix shortest(node) function in pure mercurial
Pure mercurial (i.e. without c extensions) does not support partialmatch() on
the revlog index, so we must fall back to use revlog._partialmatch() to handle
that case for us. The tests caught this.
We don't use revlog._partialmatch() for the normal case because it performs a
very expensive index iteration when the string being tested fails to find a
unique result via index.partialmatch(). It does this in order to filter
out hidden revs in hopes of the string being unique amongst non-hidden revs.
For the shortest(node) case, we'd prefer performance over worrying about
hidden revs.
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 05 Feb 2014 20:22:28 -0800 |
parents | abfe6a8e619b |
children | c697b70f295f |
comparison
equal
deleted
inserted
replaced
20370:aa51392da507 | 20371:6f3fb6a974e0 |
---|