Mercurial > hg
diff tests/test-impexp-branch.t @ 36394:4bc983568016
py3: replace file() with open()
file() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2417
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 24 Feb 2018 16:07:45 +0530 |
parents | 4d40fd0283d8 |
children | e033fd788bf8 |
line wrap: on
line diff
--- a/tests/test-impexp-branch.t Sat Feb 24 16:06:21 2018 +0530 +++ b/tests/test-impexp-branch.t Sat Feb 24 16:07:45 2018 +0530 @@ -74,9 +74,9 @@ $ hg strip --no-backup . 1 files updated, 0 files merged, 0 files removed, 0 files unresolved >>> import re - >>> p = file('../r1.patch', 'rb').read() + >>> p = open('../r1.patch', 'rb').read() >>> p = re.sub(r'Parent\s+', 'Parent ', p) - >>> file('../r1-ws.patch', 'wb').write(p) + >>> open('../r1-ws.patch', 'wb').write(p) $ hg import --exact ../r1-ws.patch applying ../r1-ws.patch