changeset 11212:4d8db9676171

util: give appropriate default args to atomictempfile() mode='w+b' is the default of python's TemporaryFile().
author Yuya Nishihara <yuya@tcha.org>
date Fri, 21 May 2010 19:54:40 +0900
parents e43c23d189a5
children 3d61813a300e
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Fri May 21 15:22:29 2010 +0200
+++ b/mercurial/util.py	Fri May 21 19:54:40 2010 +0900
@@ -772,7 +772,7 @@
     file.  When rename is called, the copy is renamed to the original
     name, making the changes visible.
     """
-    def __init__(self, name, mode, createmode):
+    def __init__(self, name, mode='w+b', createmode=None):
         self.__name = name
         self._fp = None
         self.temp = mktempcopy(name, emptyok=('w' in mode),