py3: encode the name to bytes before using in revsetpredicate()
Differential Revision: https://phab.mercurial-scm.org/D4677
--- a/tests/test-extension.t Thu Sep 20 18:36:00 2018 +0300
+++ b/tests/test-extension.t Thu Sep 20 18:36:33 2018 +0300
@@ -105,13 +105,14 @@
> def reposetup(ui, repo):
> print("4) %s reposetup" % name)
>
+ > bytesname = name.encode('utf-8')
> # custom predicate to check registration of functions at loading
> from mercurial import (
> registrar,
> smartset,
> )
> revsetpredicate = registrar.revsetpredicate()
- > @revsetpredicate(name, safe=True) # safe=True for query via hgweb
+ > @revsetpredicate(bytesname, safe=True) # safe=True for query via hgweb
> def custompredicate(repo, subset, x):
> return smartset.baseset([r for r in subset if r in {0}])
> EOF