(Feature request from Deviantart.)
- Differential Revisions
- D15330: Compare two branches
Restricted Differential Revision
- D16991 / rP4faa4b451f41: When viewing a branch, preview differences from master
D16990 / rPfc1adf987573: Modernize UI for "Compare" in Diffusion
|Open||None||T929 Allow two arbitrary revisions to be compared in Diffusion|
|Resolved||btrahan||T4896 Move Audit to ApplicationTransactions|
|Resolved||btrahan||T5745 Unable to post only inline comments to an audit|
Most of this code already exists, so this task is largely UI work. However, the diff view UI components are kind of complicated so it may be a little messy.
I'd start by adding some new controller to Diffusion, e.g. /diffusion/X/compare/. Have it show a form like:
old commit: [______] new commit: [______] [show the diff]
We can work on how to discover/enter the UI later and make it less silly.
There's some discussion of how to add new controllers and stuff here, although it might be slightly out of date. Let me know if you run into issues:
If passed 'old' and 'new', have the controller load those commits instead of showing a form. Provided they exist, pull the diff.
You can do this by modifying DiffusionRawDiffQuery to accept a second revision. Currently, it always diffs against the previous revision; keep this default behavior but allow the caller to specify an alternate revision to diff against. Then use that functionality to pull the raw diff. You can just dump it to the screen at this point to verify that the feature basically works (takes two commits, shows you the diff between them) and everything else is UI. Getting here should be fairly straightforward.
After this things get really complicated though, so maybe send me a diff for this part and we can figure out where to go next?