# HG changeset patch # User Yuya Nishihara # Date 2010-05-21 10:54:40 # Node ID 4d8db9676171dccb0a4a10b15c597a7c5f160e66 # Parent e43c23d189a586a06c533e7fdd5cef6a85e8a4e1 util: give appropriate default args to atomictempfile() mode='w+b' is the default of python's TemporaryFile(). diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -772,7 +772,7 @@ class atomictempfile(object): 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),