Move raw patch logic out of view and into diffparser
Review Request #1179 — Created Oct. 23, 2009 and submitted
Moves "create diff/patch" logic out of the view and into the diffparser. This way the view just deals with "strings" rather than having to create diff fragments. 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). Related to old (svn) review http://reviews.reviewboard.org/r/598
CL
- Change Summary:
-
* doc string updated (took suggested review comment text) * removed diagnostic code that ended up in diff * broke long line into two statements
-
So the change looks fine, style-wise, but I guess the thing I'm a little unsure about is the placement of the raw_diff function. It seems perhaps wrong to put it in DiffParser, a class responsible for the parsing of diffs. I don't have a better place off-hand to suggest, except maybe just in SCMTool (which is growing larger than I'd like, but it may be more appropriate there).