diff -r 0a12e5f3a979 -r ed1a212193dc mercurial/subrepo.py --- a/mercurial/subrepo.py Fri May 03 19:34:59 2013 +0200 +++ b/mercurial/subrepo.py Thu May 09 21:09:58 2013 +0900 @@ -31,7 +31,7 @@ def _calcfilehash(filename): data = '' if os.path.exists(filename): - fd = open(filename) + fd = open(filename, 'rb') data = fd.read() fd.close() return util.sha1(data).hexdigest()