Installation instructions

RepoCop is really easy to install. Simply download the binary package and unpack it into a folder of your choice.
All required binaries are in the main folder. Now you have to do two things
  1. You have to create a configuration file containing all the instructions you want to execute on pre- or post-commit
  2. You need to tell your subversion repository to call RepoCop

Part 1: RepoCop configuration file

Actually, RepoCop uses 2 configuration files.

Logging

One is used for logging (RepoCop uses log4net). This file was already part of the package: Silverseed.RepoCop.Subversion.exe.log4net.xml. As default, RepoCop writes all log messages to a file names Silverseed.RepoCop.log in the same folder as RepoCop. If this is fine with you than you don't need to change anything. Otherwise you might want to open this file and change the file and/or location of the log file and the error level.

Hooks

There's a demo configuration file in the examples folder. You can copy this into the actual RepoCop folder (one folder up), look at it to get a feeling on how the configuration works and then modify this file (using the documentation) to reflect all your rules and requirements.

Part 2: Call RepoCop from Subversion

In the main folder of your subversion repository there's a hooks directory. Usually there are already template files in this hooks folder for each supported hook.

To call RepoCop on pre-commit you need to add the following line to the file file called pre-commit.bat (create it if it's not there)
C:\yourpath\RepoCop\Silverseed.RepoCop.Subversion.exe pre-commit %1 %2

To call RepoCop on post-commit you need to add the following line to the file file called post-commit.bat (create it if it's not there)
C:\yourpath\RepoCop\Silverseed.RepoCop.Subversion.exe post-commit %1 %2

That's it. Now you can start testing and experimenting.

Last edited Nov 13, 2010 at 1:11 PM by markushastreiter, version 2

Comments

No comments yet.