py3: encode the name to bytes before using in revsetpredicate()
authorPulkit Goyal <pulkit@yandex-team.ru>
Thu, 20 Sep 2018 18:36:33 +0300
changeset 39730 65b39c556c6d
parent 39729 56cb053a71ed
child 39731 c71f80bfb414
py3: encode the name to bytes before using in revsetpredicate() Differential Revision: https://phab.mercurial-scm.org/D4677
tests/test-extension.t
--- 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