Patchwork [3,of,6,py3] patch: make regular expressions bytes by adding b''

login
register
mail settings
Submitter Pulkit Goyal
Date March 26, 2017, 3:46 p.m.
Message ID <bde955d3b6b93b57a0b8.1490543202@pulkit-goyal>
Download mbox | patch
Permalink /patch/19690/
State Accepted
Headers show

Comments

Pulkit Goyal - March 26, 2017, 3:46 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1490541890 -19800
#      Sun Mar 26 20:54:50 2017 +0530
# Node ID bde955d3b6b93b57a0b8169dbe17b22979620c03
# Parent  989c6385adcc3385ab984a718e09fa5d694563c4
patch: make regular expressions bytes by adding b''

Patch

diff -r 989c6385adcc -r bde955d3b6b9 mercurial/patch.py
--- a/mercurial/patch.py	Sun Mar 26 20:52:51 2017 +0530
+++ b/mercurial/patch.py	Sun Mar 26 20:54:50 2017 +0530
@@ -42,8 +42,8 @@ 
 )
 stringio = util.stringio
 
-gitre = re.compile('diff --git a/(.*) b/(.*)')
-tabsplitter = re.compile(r'(\t+|[^\t]+)')
+gitre = re.compile(br'diff --git a/(.*) b/(.*)')
+tabsplitter = re.compile(br'(\t+|[^\t]+)')
 
 class PatchError(Exception):
     pass