diff --git a/tests/test-convert-hg-source.t b/tests/test-convert-hg-source.t --- a/tests/test-convert-hg-source.t +++ b/tests/test-convert-hg-source.t @@ -126,9 +126,9 @@ $ cat > rewrite.py < import sys > # Interlace LF and CRLF - > lines = [(l.rstrip() + ((i % 2) and '\n' or '\r\n')) - > for i, l in enumerate(file(sys.argv[1]))] - > file(sys.argv[1], 'wb').write(''.join(lines)) + > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n')) + > for i, l in enumerate(open(sys.argv[1], 'rb'))] + > open(sys.argv[1], 'wb').write(b''.join(lines)) > EOF $ $PYTHON rewrite.py new/.hg/shamap $ cd orig