[PATCH 1 of 3 v2] hghave: matchoutput needs to use bytes for regexp

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon May 9 10:28:27 EDT 2016



On 05/08/2016 10:28 PM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1462439221 0
> #      Thu May 05 09:07:01 2016 +0000
> # Node ID 18ef4f2e901adfba72054641bf5bfa21aa64a17e
> # Parent  57a24a85a2bc484cbd7c4b80959dc2d5f0483174
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r 18ef4f2e901a
> hghave: matchoutput needs to use bytes for regexp
>
> file output is bytes in py3, so we need to convert the regexp to bytes

Shouln't we ensure the callers are passing bytes instead? (by adding b 
prefix to string).
Implicite conversion of string to bytes in function iternal seems like a 
bad idea.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list