I think I came up with three ideas, each building on each other, to
allow this support to come to fruition gradually.
Step 1)
Modify post-review so that it will create an individual review on the
Review Board server for each patch in a branch. Post-review should also
amend the commit history of the patches in the branch to tag them with a
link to the review in Review Board. Post-review would then be made aware
of the presence of this tag, and in the case of review updates, it
should use this tag to determine which review to update.
Furthermore, post-review should attach a complete list of the patches in
review as part of the review description (this would probably require
going back after creating the initial reviews and adding this afterwards
as a comment).
Ideally, it would read something like:
http://reviews.example.com/r/1
http://reviews.example.com/r/2 <--
http://reviews.example.com/r/3
So you'd always have an easy way to identify which patch in the series
you were looking at, as well as a view on which other reviews were
related.
If the branch adds or removes patches, it should add a new comment with
the new list of patches, ordered appropriately.
Pros: Changes are almost entirely in post-review.
Cons: Could result in heavy amounts of email, since each patch would
have its own email thread.
Step 2)
Post-review should generate patches formatted with 'git format-patch -M
-C --full-index' and attach them as raw files to the review(s). There
are several ways this could be done; one patch per review, or all
patches on the first review in the series*.
As I understand it, raw file upload support is already planned for 1.7,
so this wouldn't be a major effort to implement. Mainly just extending
the changes from Step 1) to include generating and uploading the files.
* This might have issues if the first patch in a series is ever removed.
Might require some careful design.
Step 3) (Long-term ideas, some of which are taken from gerrit)
Make the Review Board server into a public git repository. Post-review
could then commit to this public repository in a private branch which
would then be used to generate the reviews for Step 1) and Step 2).
Users can then set up a remote repository with 'git remote add' to be
able to easily retrieve the changes and perform local tests.
Doing things this way would require quite a bit more work than Step 1)
or Step 2), but in the long-term, it would fit a lot more closely with
common git workflows. We probably wouldn't need to have post-review
generate the raw files at all, here. We could have Review Board itself
generate them on-request rather than storing them separately (since it
will have access to the repository directly).
Thanks for bumping this thread. I've been giving this functionality some thought lately, and here's what I'm currently leaning toward:
1) Give Review Board support for attaching multiple diffs (not just one) in any given update. It would work like today in that a user would run post-review and another user would see the latest changes, except it'd be broken up into several diffs.
2) Update post-review to support providing multiple diffs on upload automatically. There could be an option for squashing.
3) Store all the extra diff metadata and show it per-diff set in the diff viewer.
That's the first step and gets us patch series. The next would be deeper repo integration, which will benefit from all the deep hosting service work I'm doing right now for GitHub.
4) Provide an endpoint for WebHooks on different services (like GitHub) that will auto-post review requests when there are pull requests.
5) Tie into the APIs to accept/merge changes when it's possible (possibly easier for hosting services, but harder for standalone repos)
6) Add metadata for branches and make it possible for Review Board to tie in closer with a branch on an accessible repo, to make updating easier. This isn't fully thought out yet.
7) Eventually add some sort of tree browser. This gets very complicated on Git without a hosting service or without the Git repo being directly accessible.
Whatever we do, I think it's important that Review Board be itself aware of things like patchsets and DVCS workflows.
Christian
> --
> Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to reviewboard...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Hi,This looks great! This is the type of functionality we are looking for. The patch set functionalityis especially needed. Any progress on this? I will see how much I can read from the code, any pointers on how to startadding this? I just thought I would give it a run... :)Cheers,Ryan
I've been trying to work out for some time now how to accomplish
patch-series in Git with Review Board. [...]
Modify post-review so that it will create an individual review on the
Review Board server for each patch in a branch.
Make the Review Board server into a public git repository.