Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 9031:3b76321aa0de
compat: use open() instead of file() everywhere
author | Alejandro Santos <alejolp@alejolp.com> |
---|---|
date | Sun, 05 Jul 2009 11:01:30 +0200 |
parents | ada93c6bf554 |
children | 8e34f363dd77 |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jul 05 11:01:01 2009 +0200 +++ b/mercurial/commands.py Sun Jul 05 11:01:30 2009 +0200 @@ -750,7 +750,7 @@ ui.write("%s\n" % "\n".join(sorted(cmdlist))) def debugfsinfo(ui, path = "."): - file('.debugfsinfo', 'w').write('') + open('.debugfsinfo', 'w').write('') ui.write('exec: %s\n' % (util.checkexec(path) and 'yes' or 'no')) ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no')) ui.write('case-sensitive: %s\n' % (util.checkcase('.debugfsinfo') @@ -983,7 +983,7 @@ if list(files) != [os.path.basename(fa)]: ui.write(_(" unexpected patch output!\n")) patchproblems += 1 - a = file(fa).read() + a = open(fa).read() if a != b: ui.write(_(" patch test failed!\n")) patchproblems += 1