Mercurial > hg-stable
changeset 37667:701c261fba83
py3: use b"%d" instead of str() to convert int to bytes
While I was here, I added 'and None' to suppress return values of .write()
calls.
Differential Revision: https://phab.mercurial-scm.org/D3328
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 14 Apr 2018 02:04:19 +0530 |
parents | 46e705b79323 |
children | 2a42ca2679e2 |
files | tests/test-clone-uncompressed.t |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-clone-uncompressed.t Sat Apr 14 02:03:02 2018 +0530 +++ b/tests/test-clone-uncompressed.t Sat Apr 14 02:04:19 2018 +0530 @@ -18,7 +18,7 @@ $ hg -q commit -A -m initial >>> for i in range(1024): ... with open(str(i), 'wb') as fh: - ... fh.write(str(i)) + ... fh.write(b"%d" % i) and None $ hg -q commit -A -m 'add a lot of files' $ hg st $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid