Mercurial > hg
changeset 35579:15ddf83fbf84
py3: use bytes and open() instead of file() in test-diff-upgrade.t
file() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1789
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 29 Dec 2017 05:35:57 +0530 |
parents | 86f9aabed67b |
children | cb0db11f392d |
files | tests/test-diff-upgrade.t |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-diff-upgrade.t Wed Jan 10 11:02:20 2018 -0800 +++ b/tests/test-diff-upgrade.t Fri Dec 29 05:35:57 2017 +0530 @@ -16,7 +16,7 @@ $ echo regular > regular $ echo rmregular > rmregular - $ $PYTHON -c "file('bintoregular', 'wb').write('\0')" + $ $PYTHON -c "open('bintoregular', 'wb').write(b'\0')" $ touch rmempty $ echo exec > exec $ chmod +x exec @@ -26,7 +26,7 @@ $ echo unsetexec > unsetexec $ chmod +x unsetexec $ echo binary > binary - $ $PYTHON -c "file('rmbinary', 'wb').write('\0')" + $ $PYTHON -c "open('rmbinary', 'wb').write(b'\0')" $ hg ci -Am addfiles adding binary adding bintoregular @@ -50,8 +50,8 @@ $ rm rmexec $ chmod +x setexec $ chmod -x unsetexec - $ $PYTHON -c "file('binary', 'wb').write('\0\0')" - $ $PYTHON -c "file('newbinary', 'wb').write('\0')" + $ $PYTHON -c "open('binary', 'wb').write(b'\0\0')" + $ $PYTHON -c "open('newbinary', 'wb').write(b'\0')" $ rm rmbinary $ hg addremove -s 0 adding newbinary