Review Board - Post separate commits, ignoring pull commits

404 Views Asked by At

I have 3 commits: C1, C2, C3. They have 3 hashes: #C1, #C2, #C3. I submitted C1, and C3. C2 I received when I did 'git pull'. I want to post commits C1 and C3. As far as I can tell I can't do this in Review Board, but hopefully I am wrong.

Normally to post multiple commits, you have to post all inbetween. For example:

rbt post #C1..#C3

I want to only post #C1 and #C3. Or what could also possibly work is posting C1, and then later on update it with C3.

2

There are 2 best solutions below

0
On BEST ANSWER

I ended up finding a very cool solution.

I stated that I received C2 from a 'git pull'. It turns out that we can make the post based on the branch that I pulled from. In this case, the pull was from 'origin/master'.

I did:

rbt post -r #postnum --tracking-branch origin/master

The reason this works is because the 'origin/master' branch knows C2, but not C1 or C3, so the diff that is generated on review board is based only on C1 and C3. There is the issue of description being messed up, but this can be edited and is not as important as the diff looking correct.

1
On

AFAIK.. Reviewboard doestn't just display/highlight "uploaded diffs". It needs a local (back-end) repo, and displays the changes as diffs against this repo. As such, it needs to have in its local repo the base commit that you're diffing against. You can post C1..C3 because the back-end repo has C1's parent C0. But you can't post C2 or C3 on their own because RB does not have their parent in its db.