##// END OF EJS Templates
atomictempfile: make close() consistent with other file-like objects....
atomictempfile: make close() consistent with other file-like objects. The usual contract is that close() makes your writes permanent, so atomictempfile's use of close() to *discard* writes (and rename() to keep them) is rather unexpected. Thus, change it so close() makes things permanent and add a new discard() method to throw them away. discard() is only used internally, in __del__(), to ensure that writes are discarded when an atomictempfile object goes out of scope. I audited mercurial.*, hgext.*, and ~80 third-party extensions, and found no one using the existing semantics of close() to discard writes, so this should be safe.
Greg Ward -
r15057:774da712 default
Show More
Name Size Modified Last Commit Author
/ mercurial / hgweb
__init__.py Loading ...
common.py Loading ...
hgweb_mod.py Loading ...
hgwebdir_mod.py Loading ...
protocol.py Loading ...
request.py Loading ...
server.py Loading ...
webcommands.py Loading ...
webutil.py Loading ...
wsgicgi.py Loading ...