diff hgext/churn.py @ 38082:1978abdb216c

py3: make sure we open files in bytes mode we internally deal with bytes and should read files in bytes mode. Differential Revision: https://phab.mercurial-scm.org/D3606
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 19 May 2018 18:47:20 +0530
parents 543b7b349b2c
children 282f3daac1d7
line wrap: on
line diff
--- a/hgext/churn.py	Sat May 19 18:45:53 2018 +0530
+++ b/hgext/churn.py	Sat May 19 18:47:20 2018 +0530
@@ -161,7 +161,7 @@
     if not aliases and os.path.exists(repo.wjoin('.hgchurn')):
         aliases = repo.wjoin('.hgchurn')
     if aliases:
-        for l in open(aliases, "r"):
+        for l in open(aliases, "rb"):
             try:
                 alias, actual = l.rsplit('=' in l and '=' or None, 1)
                 amap[alias.strip()] = actual.strip()