Hands-on: Hook up with a CVS repository

Last updated on
30 April 2025

You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules

Step 1: create a CVS repository (skip this if you've already got one)

  • cvs -d /home/joe/testrepo init
  • cvs -d /home/joe/testrepo co -d /home/joe/testrepo-checkout .
  • cd /home/joe/testrepo-checkout
  • echo "Blah" > a.txt
  • cvs add a.txt
  • cvs commit -m 'Initial Blah!'

Step 2: set up your Drupal site with that repository

  • Enable the "Version Control API", "Commit Log" and "CVS backend" modules.
  • Go to Project administration → VCS repositories → Add CVS repository in the admin area.
  • Repository name: "Test repo", or whatever.
  • Repository root: "/home/joe/testrepo".
  • Save the repo, then follow the "fetch now" link.
  • Enable the "Commit messages" menu entry, or go directly to the "commitlog" path.
  • The commit shows up there (and the message log will be updated on every cron run). Win!

Step 3: Use trigger scripts instead of log parsing

  • cd /home/joe/testrepo/CVSROOT
  • chmod u+w *
  • Make sure UseNewInfoFmtStrings=yes exists and is uncommented in the "config" file.
  • cp $DRUPAL_ROOT/sites/all/modules/versioncontrol_cvs/xcvs/*.* .
  • chmod a+x xcvs-*
  • Adapt xcvs-config.php as described in the file itself.
  • Put the lines listed in versioncontrol_cvs/xcvs/README.txt into the "commitinfo", "loginfo", "taginfo" and "posttag".
  • Go to Project administration → VCS repositories → (edit the CVS repository), and switch "Update method" to "Use external script to insert data".
  • Commit something.
  • Shows up on the "Commit messages" page!
  • Bonus feature #1: Enable the "Commit restrictions" module, and define a set of allowed branches and tags – you can't commit into those now.
  • Bonus feature #2: If the project node integration module (versioncontrol_project) is enabled and has the "Enable project-based commit restrictions" option checked, only project maintainers may commit into the directory where the project is located.

Help improve this page

Page status: Not set

You can: