D2133: py3: replace file() with open() in test-convert-git.t
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Feb 11 12:42:56 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
file() is not present in Python 3.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2133
AFFECTED FILES
tests/test-convert-git.t
CHANGE DETAILS
diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -420,7 +420,7 @@
$ mkdir git-repo3
$ cd git-repo3
$ git init-db >/dev/null 2>/dev/null
- $ $PYTHON -c 'file("b", "wb").write("".join([chr(i) for i in range(256)])*16)'
+ $ $PYTHON -c 'open("b", "wb").write("".join([chr(i) for i in range(256)])*16)'
$ git add b
$ commit -a -m addbinary
$ cd ..
@@ -437,7 +437,7 @@
$ cd git-repo3-hg
$ hg up -C
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ $PYTHON -c 'print len(file("b", "rb").read())'
+ $ $PYTHON -c 'print len(open("b", "rb").read())'
4096
$ cd ..
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list