D2122: py3: replace file() with open() in test-mactext.t
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Feb 11 09:04:57 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGadec6374a0b2: py3: replace file() with open() in test-mactext.t (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2122?vs=5385&id=5411
REVISION DETAIL
https://phab.mercurial-scm.org/D2122
AFFECTED FILES
tests/test-mactext.t
CHANGE DETAILS
diff --git a/tests/test-mactext.t b/tests/test-mactext.t
--- a/tests/test-mactext.t
+++ b/tests/test-mactext.t
@@ -3,9 +3,9 @@
> import sys
>
> for path in sys.argv[1:]:
- > data = file(path, 'rb').read()
- > data = data.replace('\n', '\r')
- > file(path, 'wb').write(data)
+ > data = open(path, 'rb').read()
+ > data = data.replace(b'\n', b'\r')
+ > open(path, 'wb').write(data)
> EOF
$ cat > print.py <<EOF
> import sys
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list