changeset 39730:65b39c556c6d

py3: encode the name to bytes before using in revsetpredicate() Differential Revision: https://phab.mercurial-scm.org/D4677
author Pulkit Goyal <pulkit@yandex-team.ru>
date Thu, 20 Sep 2018 18:36:33 +0300
parents 56cb053a71ed
children c71f80bfb414
files tests/test-extension.t
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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