Ideally we could get the parent diff from Review Board, first apply that, and then apply the actual diff. But after looking into this briefly it doesn't look like we can download the parent diff from Review Board. Please, someone jump in here and tell me I'm wrong!
What we can do, however, is download the fully patched file (for each file in the review), and build with that! Using review 23506 as an example. First we can get the latest revision: $ curl https://reviews.apache.org/api/review-requests/23506/diffs Let's assume the latest revision is 42. Then we can get the files for this review request via: $ curl https://reviews.apache.org/api/review-requests/23506/diffs/42/files/ Now, for each file we can download the contents. The files are given number values, in this case 632598: $ curl https://reviews.apache.org/api/review-requests/23506/diffs/42/files/632598/patched-file/ Then we can copy that file to the right location, and run the build! No need to download the diff (or try and find the parent diff). This is a few extra steps but I think it'll allow our reviews to always build without relying on the error prone 'depends on' field. How does this sound? Ben. On Wed, Jul 16, 2014 at 10:34 AM, Vinod Kone <[email protected]> wrote: > > On Wed, Jul 16, 2014 at 10:03 AM, Benjamin Hindman <[email protected]> > wrote: > >> Remind me how review bot operates again? Why can't we apply the parent >> diff and then the actual diff and just build that? If the review has >> everything it needs and is buildable, it would be nice if we can just build >> it. >> > > The bot just applies reviews on top of the HEAD ( > https://github.com/apache/mesos/blob/master/support/verify-reviews.py). > Not sure how you can get the parent diff from the raw diff. > > AFAICT, for this to work, your branch needs to be a review on the review > board and tim's reviews should be linked up properly by setting up the > "depends on" field. > > >
