3

My team is starting to use Review Board with Perforce with a pre-commit review. We want to send all pre-commits to reviewboard. Though I believe pre-commit is the best way to go about this (than a post-commit review), I have some questions:

  1. How does someone verify their changes work with the build system before committing the change? I would want to be confident that the changes I'm submitting for review will build.
  2. Some people like to make small commits. They could be to the same file(s). How do we balance making small commits with submitting each change pre-commit to review board?
sgarg
  • 2,340
  • 5
  • 30
  • 42
  • 1. How is Review Board relevant? You'd have the same problem without a review process. 2. Is it really a problem? Many small reviews are much easier and faster to review than a small number of large reviews. Also, doesn't seem like either question is really Perforce-specific. – jamesdlin Sep 20 '15 at 16:56
  • 1. Yeah, it's the same problem, except with a review-board there's more delay for approval due to multiple checkins for things you overlooked. 2. Again, small commits are good for being sure while developing but they would lead to more delay since you have to wait for approval on a previous small commit. Also, the reviewer would not have complete information from the first small commit, meaning it would lead to big commits – sgarg Sep 23 '15 at 15:02

2 Answers2

1

1) You can have a script that builds the code with your changes on your machine and posts the result of this on the review board in draft state. Based on the result you can publish the review which will notify the reviewer.

2) I agree with @jamesdlin. Your argument that this would slow down the whole process depends on the reviewer.

gaganso
  • 2,914
  • 2
  • 26
  • 43
  • Thank you for your answer! You're right on both counts. I've added an answer which is specific to my case and works for me. – sgarg May 17 '16 at 19:14
  • Welcome @sgarg. Would you mind upvoting/ accepting this if it helped you? – gaganso May 18 '16 at 04:02
0

1) For the first question, if you're using Perforce, one answer is to build shelved changes, like the answer here: https://stackoverflow.com/a/34881362/369243

2) Perforce is not a good solution for making small commits, but git is. There can be multiple small commits in a merge request.

Community
  • 1
  • 1
sgarg
  • 2,340
  • 5
  • 30
  • 42