Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've found many Code Review tools:

But didn't found any, which would be directly connected with the versioning system.

As I want the code review proccess to be required, so nobody can push any single line of unreviewed code to master, I need my versioning system to deny all pushes of revisions which were not reviewed yet.

Is there any tool which does that? Or is there any easy way how to do that?

share|improve this question

closed as not constructive by gnat, MichaelT, Martijn Pieters, ChrisF Jun 16 '13 at 10:06

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

What's your reasoning for requiring pre-commit reviews? In a lot of scenarios post-commit reviews work better as pre-commit reviews can turn into considerable bottlenecks, especially at crunch time. – Timo Geusch Mar 18 '12 at 15:17

I have moved entirely to GIT from CVS for all but large legacy systems where the cost to migrate is not worth it. This is largely as a result of the improved tool support and work flow. To all practical purposes, CVS development stopped a long time ago, and the third party tool support for modern features followed soon after, you have always had to role your own bespoke systems with CVS, whereas with GIT, Mecurial etc, theres a lot of off the shelf stuff that just works (provided you want to do it the way the tool chan does).

The CVS systems we used had a large amount of custom code around workflow and Config managment attched. These amounted to years of development effort, as CVS alone didn't cut it. In fact the only cvs command we used directly was 'cvs checkout'. The lack of tool suuport such as you are asking for is a large reaosn for the move.

Depending on your circumstanse, would it be possible to move to GIT for all developer workflow, use Gerrit for code review, and then push the reviewed code to the CVS repo?

share|improve this answer

I'm not familiar with the other tools, but Facebook accomplishes this with Phabricator by installing pre-commit (SVN) or pre-receive (Git) hooks. Phabricator ships with some example hook actions:

arc svn-hook-pre-commit:

arc git-hook-pre-receive:

However, the open source versions of these hooks (especially the Git hook) aren't in great shape (most OS Phabricator users host on GitHub, where you can't install pre-receive hooks, and Facebook's internal hooks are more complicated, so we haven't had too many requests to modernize/improve them), so they're more like templates than working solutions right now.

These hooks also go farther than requiring code review: they block commits which raise lint errors, to (for example) reject changes that introduce syntax errors. (This occurred routinely at Facebook.)

Generally, with any code review tool, you should be able to write a fairly simple hook to verify reviews (you can consult your VCS's documentation on hooks for details), so you might be best off selecting a review tool based on other features and then hooking up integration afterward if it doesn't ship with anything.

share|improve this answer
CVS has a similar hook-point, in which something like this can be done. – Ross Patterson Mar 18 '12 at 1:52
I think the question means "VCS", not "CVS". – Evan Priestley Mar 18 '12 at 3:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.