Question

Today I've updated our repository and tried to recompile it (it's a c++ application). It doesn't compile. My first reaction was to kill my coworker, but because I can't do it I need to find another solution.

Is it possibile to prevent to commit code that doesn't compile? We have a Makefile and what the pre-commit hook need to do it's simpy to check the output status of the command make. Is it right?

How in pratice can I implement it (I've never work with svn hook)?

Was it helpful?

Solution

It's right in principle. However, it will likely cause major delays in committing (unless your application compiles in under a second). So you should really look for a different approach, where it lets users commit, but than starts a build process right away, and sends out email if it fails to build.

One way of doing that is buidbot.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top