Subversion Integration

By hooking your Subversion server to Attract, tasks can be automatically updated based on tags in the commit message. This requires a post-commit hook to be installed on the Subversion server.

Example hook:


/usr/bin/python3 "$REPOS"/hooks/ "$REPOS" "$REV"

The file is bundled with Attract's source code, and needs to be copied to the Subversion repository's hook directory. After copying, modify the code to include an authentication token and the mapping from the Subversion repository name to the project URL. For example:

AUTH_TOKEN = 'SRVxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
PROJECT_URLS = {  # Mapping from SVN repository name to Attract project URL.
    'svnreponame': 'p-123456789',

The authentication token must be created on the server using attract create_svner_account {emailaddress} {project-url}

The project should have an svn_url extension property in the MongoDB database, which points to the Subversion server URL. This is for logging use only.