D4677: py3: encode the name to bytes before using in revsetpredicate()

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Thu Sep 20 15:41:32 EDT 2018


indygreg added inline comments.

INLINE COMMENTS

> test-extension.t:108
>    > 
> +  > bytesname = name.encode('utf-8')
>    > # custom predicate to check registration of functions at loading

`name` will already be bytes on Python 2. But, `.encode()` will still work because Python 2 has an `encode()` on bytes. So I think this is fine. If this weren't test code, I would have a different opinion.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4677

To: pulkit, #hg-reviewers
Cc: indygreg, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list