##// END OF EJS Templates
py3: replace file() with open() in test-convert-hg-source.t...
Pulkit Goyal -
r36070:3c9f2d4d default
parent child Browse files
Show More
@@ -126,9 +126,9 b' check shamap LF and CRLF handling'
126 $ cat > rewrite.py <<EOF
126 $ cat > rewrite.py <<EOF
127 > import sys
127 > import sys
128 > # Interlace LF and CRLF
128 > # Interlace LF and CRLF
129 > lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n'))
129 > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n'))
130 > for i, l in enumerate(file(sys.argv[1]))]
130 > for i, l in enumerate(open(sys.argv[1], 'rb'))]
131 > file(sys.argv[1], 'wb').write(''.join(lines))
131 > open(sys.argv[1], 'wb').write(b''.join(lines))
132 > EOF
132 > EOF
133 $ $PYTHON rewrite.py new/.hg/shamap
133 $ $PYTHON rewrite.py new/.hg/shamap
134 $ cd orig
134 $ cd orig
General Comments 0
You need to be logged in to leave comments. Login now