encoding: avoid localstr when a string can be encoded losslessly (
issue2763)
localstr's hash method exists to prevent bogus matching on lossy local
encodings. For instance, we don't want 'caf?' to match 'café' in an
ASCII locale.
But when café can be losslessly encoded in the local charset, we can
simply use a normal string and avoid the hashing trick.
This avoids using localstr's hash method, which would prevent a match between
revset: optimize stringset when subset == entire repo
if range(len(repo)) is passed to stringset and x is a valid rev
(checked before) then x is guaranteed to be in subset, we can check
for that by comparing the lengths of the sets