[PATCH 1 of 2] py3: open file in rb mode

Rishabh Madan rishabhmadan96 at gmail.com
Wed Mar 15 09:35:10 UTC 2017


# HG changeset patch
# User Rishabh Madan <rishabhmadan96 at gmail.com>
# Date 1489569678 -19800
#      Wed Mar 15 14:51:18 2017 +0530
# Node ID 1ada79790380d3f9e416780f6447b383cc18f817
# Parent  1c48a8278b2f015fca607dfc652823560a5ac580
py3: open file in rb mode

diff -r 1c48a8278b2f -r 1ada79790380 mercurial/match.py
--- a/mercurial/match.py	Sun Mar 12 17:16:43 2017 -0700
+++ b/mercurial/match.py	Wed Mar 15 14:51:18 2017 +0530
@@ -740,7 +740,7 @@
     syntax = 'relre:'
     patterns = []
 
-    fp = open(filepath)
+    fp = open(filepath, 'rb')
     for lineno, line in enumerate(util.iterfile(fp), start=1):
         if "#" in line:
             global _commentre


More information about the Mercurial-devel mailing list