util: give appropriate default args to atomictempfile()
authorYuya Nishihara <yuya@tcha.org>
Fri, 21 May 2010 19:54:40 +0900
changeset 11212 4d8db9676171
parent 11211 e43c23d189a5
child 11213 3d61813a300e
util: give appropriate default args to atomictempfile() mode='w+b' is the default of python's TemporaryFile().
mercurial/util.py
--- 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),