(Feature request from Deviantart.)
Description
Revisions and Commits
Restricted Differential Revision | |||
rP Phabricator | |||
D15330 Compare two branches | |||
D16991 | rP4faa4b451f41 When viewing a branch, preview differences from master | ||
D16990 | rPfc1adf987573 Modernize UI for "Compare" in Diffusion |
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | chad | T12824 Redesign 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 |
Event Timeline
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:
http://www.phabricator.com/docs/phabricator/article/Phabricator_Code_Layout.html
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?
It would also be great to be able to see all the commits in a range, e.g. master@{1week}...master. (Comes in handy when writing changelogs.)
It would be fantastic to get a view of Diffusion diff's with id and title between builds, to hand to QA with each testable build.