[PATCH] schemes: use br'' literal to define bytes regexp

Yuya Nishihara yuya at tcha.org
Fri Mar 10 04:05:22 UTC 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1489117300 28800
#      Thu Mar 09 19:41:40 2017 -0800
# Node ID 8dfbe215fa6855ba1d739a0c442c00b58d67aaf8
# Parent  052bc876a87929b4fb9141a50de59d7f2fdb93ea
schemes: use br'' literal to define bytes regexp

diff --git a/hgext/schemes.py b/hgext/schemes.py
--- a/hgext/schemes.py
+++ b/hgext/schemes.py
@@ -63,7 +63,7 @@ command = cmdutil.command(cmdtable)
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
-_partre = re.compile(r'\{(\d+)\}'.encode(u'latin1'))
+_partre = re.compile(br'\{(\d+)\}')
 
 class ShortRepository(object):
     def __init__(self, url, scheme, templater):


More information about the Mercurial-devel mailing list