##// END OF EJS Templates
py3: replace file() with open() in test-import.t...
Pulkit Goyal -
r36041:2a81ed6c default
parent child Browse files
Show More
@@ -56,7 +56,7 b' regardless of the commit message in the '
56 $ cat > dummypatch.py <<EOF
56 $ cat > dummypatch.py <<EOF
57 > from __future__ import print_function
57 > from __future__ import print_function
58 > print('patching file a')
58 > print('patching file a')
59 > file('a', 'wb').write('line2\n')
59 > open('a', 'wb').write(b'line2\n')
60 > EOF
60 > EOF
61 $ hg clone -r0 a b
61 $ hg clone -r0 a b
62 adding changesets
62 adding changesets
@@ -291,7 +291,7 b' override commit message'
291 > msg.set_payload('email commit message\n' + patch)
291 > msg.set_payload('email commit message\n' + patch)
292 > msg['Subject'] = 'email patch'
292 > msg['Subject'] = 'email patch'
293 > msg['From'] = 'email patcher'
293 > msg['From'] = 'email patcher'
294 > file(sys.argv[2], 'wb').write(msg.as_string())
294 > open(sys.argv[2], 'wb').write(msg.as_string())
295 > EOF
295 > EOF
296
296
297
297
@@ -389,7 +389,7 b" The '---' tests the gitsendmail handling"
389 > msg.set_payload('email patch\n\nnext line\n---\n' + patch)
389 > msg.set_payload('email patch\n\nnext line\n---\n' + patch)
390 > msg['Subject'] = '[PATCH] email patch'
390 > msg['Subject'] = '[PATCH] email patch'
391 > msg['From'] = 'email patcher'
391 > msg['From'] = 'email patcher'
392 > file(sys.argv[2], 'wb').write(msg.as_string())
392 > open(sys.argv[2], 'wb').write(msg.as_string())
393 > EOF
393 > EOF
394
394
395
395
@@ -829,7 +829,7 b' Test importing a patch ending with a bin'
829 $ hg init binaryremoval
829 $ hg init binaryremoval
830 $ cd binaryremoval
830 $ cd binaryremoval
831 $ echo a > a
831 $ echo a > a
832 $ $PYTHON -c "file('b', 'wb').write('a\x00b')"
832 $ $PYTHON -c "open('b', 'wb').write(b'a\x00b')"
833 $ hg ci -Am addall
833 $ hg ci -Am addall
834 adding a
834 adding a
835 adding b
835 adding b
General Comments 0
You need to be logged in to leave comments. Login now