Install a Subversion adapter on Windows

Install a Subversion adapter as a post-receive hook on Windows.

Minimum requirements:
This procedure assumes that you have installed CollabNet Subversion Edge, version 4.0 or higher, although other Windows distributions can be similarly configured. Each external Subversion repository you wish to monitor with TeamForge EventQs requires the installation of a customized post-commit hook script as follows.

Install Subversion post-commit hooks

  1. Download the EventQ-svn-adapter-[version].zip adapter file from the TeamForge EventQ Community web site and unpack it inside your repository's hooks directory. For example, if your repository's hooks directory is located at C:\csvn\repositories\my_repo\hooks :

    cd C:\csvn\repositories\my_repo\hooks

    # Download the zip file to the current location

    unzip EventQ-svn-adapter-1.0.zip

    This will unpack the following into your hooks directory:
    • LICENSE.txt
    • README.txt
    • configdefaults.py
    • configwrapper.py
    • eventq_commit_gate_hook.py
    • orchestrator_commit_gate_hook_snippet.sh
    • pika/
    • post-commit.bat.sample
    • post_commit_orc_publish_amqp.conf.sample
    • post_commit_orc_publish_amqp.py

Configuration

  1. In a web browser, log into TeamForge EventQ as a privileged EventQ user and edit (or add) the relevant Commit source you wish to associate with this Subversion repository.

    Manage Sources > Toggle Commit > Add or Edit a Source > External repository

  2. On the Edit Source screen, locate the section titled "Adapter Configuration Information" and copy all values; these values are used later in the configuration process.
  3. Copy post_commit_orc_publish_amqp.conf.sample to post_commit_orc_publish_amqp.conf.
  4. Edit post_commit_orc_publish_amqp.conf and modify options for your specific installation, for example:
    Logging section
    • filename — Full path to the desired log file, for example, C:\Temp\post-commit.log.
      Note: Ensure that the log file exists, or create it, before proceeding to the next step.
    • level — The logging level, which is one of these: debug , info, warning, error, or critical.
    svnlook section
    • svnlook — The path to your svnlook executable, for example, C:\csvn\bin\svnlook.exe.
    RabbitMQ (amqp) section
    • host — The hostname of the amqp server. Copy and paste the hostname from the Queue Server value from the Edit Source screen in TeamForge EventQ.
    • port — The port number of the amqp server (default is 5672). Copy and paste the port number the Queue Server value from the Edit Source screen in TeamForge EventQ.
    • username— Username used to access the amqp server. Copy and paste the queue username value from the Edit Source screen in TeamForge EventQ.
    • password — Password used to access the amqp server. Copy and paste the queue password value from the Edit Source screen in TeamForge EventQ.
    A RabbitMQ server is optionally set up during the installation process. The installation process sets a default password for the "eventq" user and stores it for reference in the following file on the RabbitMQ host (root access required):
    /opt/collabnet/rabbitmq/.rabbit_passwords
    TeamForge EventQ section
    • source_association_key — key provided by TeamForge EventQ. Copy and paste the source association key value from the Edit Source screen in TeamForge EventQ. For more on association keys, see Source association keys.

Activate post-commit hook

  1. Copy post-commit.bat.sample to post-commit.bat.
  2. Edit post-commit.bat for your specific installation: set PYTHON_EXE to the full path to python.exe executable. For CollabNet Subversion Edge, this is typically C:\csvn\Python25\python.exe