Here is a patch :
- util.set_binary() takes an argument to enable/disable binary mode
- a binaryfile() method returns an ui-based stream in binary mode to hide
set_binary calls and force people to cleanup.
- patch.diff() uses binaryfile() as fp instead of ui. |