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 39746 65b39c556c6d
parent 39745 56cb053a71ed
child 39747 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