Move raw patch logic out of view and into diffparser

Review Request #598 — Created Oct. 20, 2008 and discarded — Latest diff uploaded

Information

Review Board SVN (deprecated)

Reviewers

This is mostly to generate discussion. I'd like to implement my own raw patch mechanism (I need to re-create some of the information that was lost during the diff parse stage). I've moved code from the rawview into the diff parser so that I can implement my own logic in a subclass of diffparser.

Moving the logic out of the view also means that the raw patch can be exposed in other places, e.g. we could expose the diff in an email (NOTE if this was done would need to be configurable so that normal users don't suffer the overhead of generating raw patches, e.g. lazy/deferred evaluation or a config option).

A repr() implementation for File also snuck into this change as I found this useful for debugging.

tested with svn (normal raw diff) and with a subclassed custom diffparser