Mercurial > hg
changeset 36017:eed40f0f4c6f
py3: replace file() with open() in test-tag.t
file() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2116
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 17:01:25 +0530 |
parents | ca62987f3f7d |
children | 1c322658f43e |
files | tests/test-tag.t |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-tag.t Sun Feb 11 17:00:21 2018 +0530 +++ b/tests/test-tag.t Sun Feb 11 17:01:25 2018 +0530 @@ -231,8 +231,8 @@ doesn't end with EOL $ $PYTHON << EOF - > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close() - > f = file('.hg/localtags', 'w'); f.write(last); f.close() + > f = open('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close() + > f = open('.hg/localtags', 'w'); f.write(last); f.close() > EOF $ cat .hg/localtags; echo acb14030fe0a21b60322c440ad2d20cf7685a376 localblah @@ -243,8 +243,8 @@ $ $PYTHON << EOF - > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close() - > f = file('.hgtags', 'w'); f.write(last); f.close() + > f = open('.hgtags'); last = f.readlines()[-1][:-1]; f.close() + > f = open('.hgtags', 'w'); f.write(last); f.close() > EOF $ hg ci -m'broken manual edit of .hgtags' $ cat .hgtags; echo