changeset 49c108029019 in tryton-tools:default
details: https://hg.tryton.org/tryton-tools?cmd=changeset;node=49c108029019
description:
        Fix hgbranch for Python3
diffstat:

 hgbranch.py |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 85e819acff48 -r 49c108029019 hgbranch.py
--- a/hgbranch.py       Sun Sep 27 14:14:37 2020 +0200
+++ b/hgbranch.py       Sun Sep 27 14:17:30 2020 +0200
@@ -3,13 +3,13 @@
 
 from mercurial import error
 
-BRANCH_PATTERN = re.compile(r'(default|[0-9]+\.[0-9]+)')
+BRANCH_PATTERN = re.compile(br'(default|[0-9]+\.[0-9]+)')
 
 
 def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
-    if hooktype not in {'pretxnchangegroup', 'pretxncommit'}:
+    if hooktype not in {b'pretxnchangegroup', b'pretxncommit'}:
         raise error.Abort(
-            'hook should be pretxncommit/pretxnchangegroup not "%s".' %
+            b'hook should be pretxncommit/pretxnchangegroup not "%s".' %
             hooktype)
 
     for rev in range(repo[node].rev(), len(repo)):

Reply via email to