Mon, 11 Jan 2016 09:49:48 -0800 commands: get rid of empty try/finally block from _dograft
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 09:49:48 -0800] rev 27710
commands: get rid of empty try/finally block from _dograft This diff is purely an indentation change to clean up a block that was kept in place to make 77995317b374 easier to read.
Mon, 11 Jan 2016 09:49:47 -0800 commands: get rid of empty try/finally block from _dobackout
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 09:49:47 -0800] rev 27709
commands: get rid of empty try/finally block from _dobackout This diff is purely an indentation change to clean up a block that was kept in place to make c7217f1458bf easier to read.
Mon, 11 Jan 2016 09:49:39 -0800 commands: get rid of empty try/finally block from import_
Bryan O'Sullivan <bos@serpentine.com> [Mon, 11 Jan 2016 09:49:39 -0800] rev 27708
commands: get rid of empty try/finally block from import_ This diff is purely an indentation change to clean up a block that was kept in place to make 713b09fc9fbb easier to read.
Sat, 02 Jan 2016 15:09:58 -0800 streamclone: use context manager for writing files
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 15:09:58 -0800] rev 27707
streamclone: use context manager for writing files These are the file writes that have the most to gain from background I/O. Plug in a context manager so I can design the background I/O mechanism with context managers in mind.
Sat, 02 Jan 2016 15:19:47 -0800 scmutil: use context managers for file handles
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 15:19:47 -0800] rev 27706
scmutil: use context managers for file handles Now that we dropped support for Python 2.4, we are able to use context managers. Let's replace the try..finally pattern in scmutil.py with context managers, which close files automatically when the context manager is exited. There should be no change in behavior with this patch. Why convert to context managers if nothing is broken? I'm working on closing file handles in background threads to improve performance on Windows. As part of this, I realized there could be some future issues if the background file closing code isn't designed with context managers in mind. So, I'd like to switch some code to context managers so I can design an API that works with context managers.
Sat, 02 Jan 2016 15:33:01 -0800 statichttprepo: implement __enter__ and __exit__ on httprangeheader
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 15:33:01 -0800] rev 27705
statichttprepo: implement __enter__ and __exit__ on httprangeheader httprangeheader behaves like a file object. Implement __enter__ and __exit__ so it can be used as a context manager, just like file objects.
Sat, 02 Jan 2016 16:41:57 -0800 osutil: implement __enter__ and __exit__ on posixfile
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 16:41:57 -0800] rev 27704
osutil: implement __enter__ and __exit__ on posixfile So they can be used as context managers.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -7 +7 +10 +30 +100 +300 +1000 +3000 +10000 tip