1
votes

We have an SVN server with ~10 developers committing to it.

I'd like to use a local pre-commit hook to run unit tests on the developers machine and NOT have that hook committed to the repo as a property.

The flow is something like this:

  • Develop locally on domain.dev
  • Run unit tests manually (domain.dev/tests) whilst developing
  • Commit changes
  • Run local pre commit hook that makes a request to domain.dev/tests
  • Commit or not depending on the response from domain.dev/tests

Ideally we would build and run unit tests in another environment but for now we're stuck with the current set-up.

In setting up a local PCH, I specify the batch file to run. This includes the URL to execute the tests, domain.dev/tests. This domain can be different for each person. Why? Again, not an ideal set-up but it's the way we work at the moment.

When I set this up and commit the property changes, the path to the batch file is IN the commit.

When others update their repo, they get those property changed and of course an attempted commit fails because a) they don't yet have the batch file and b) the path to the batch file is saved in the property.

Right, after all that, is there a way to create a local pre-commit hook that is ONLY executed on the client and NOT committed to the repo, spoiling everyone's day?

Thanks.

1

1 Answers

1
votes

You can set up hooks locally without using the properties. Go to the settings dialog, hook scripts, then click the Add... button at the bottom right and set up the hook script there.