The Version Control API module is a relatively new module that provides functions for interfacing with the server side of version control systems (VCS). In order to work, Version Control API needs at least one VCS backend module that provides the specific VCS's functionality. At the moment, only a back end for CVS has been written (see references).
For this task, you will create a module similar to the Version Control API -- CVS backend module but which instead provides an implementation of the Subversion version control system (SVN). You should also have a look at the example "FakeVCS backend" that ships with Version Control API itself, and the overall OVERVIEW.txt for a better understanding of the API's main concepts.
Your module should have functionality similar to what is currently present in the CVS backend. There is already a Version Control API -- SVN backend (see references) project and some starter code is available (database schema + most of the user interface extensions that are required for Subversion). Also, halkeye's standalone Subversion module (see references, too) has a lot of code for interfacing with Subversion, you can likely make good use of that.
Deliverables:
* A patch to versioncontrol_svn.module that implements the required functions for Version Control API backends. These are mostly functions that transform the revision data from the database representation to the API's array format. Here's the exact list of required functions:
* hook_versioncontrol_backends()
* versioncontrol_svn_get_commit_actions()
* versioncontrol_svn_get_directory_item()
* versioncontrol_svn_get_commit_branches()
* versioncontrol_svn_get_branched_items()
* versioncontrol_svn_get_tagged_items()
* versioncontrol_svn_get_current_item_branch()
* versioncontrol_svn_get_current_item_tag()
* versioncontrol_svn_get_parent_item()
* ...and others that you might consider practicable - in particular, you'll probably need versioncontrol_svn_commit() for managing additional commit data in the database.
* Functionality to import commits from SVN logs, similar to the CVS backend's "log fetching" functionality. You can probably steal a lot of code from the Subversion module which already has an SVN log parser.
* Hook scripts that enable recording and access control for commits, similar to the CVS backend's xcvs-* scripts. As Subversion is conceptually simpler than CVS, implementing the pre-commit and post-commit hooks should suffice. (See the Subversion book for general information on these hook scripts.)
* The stated deliverables should be submitted as one or (probably) several patches to the versioncontrol_svn issue queue ( http://drupal.org/project/issues/versioncontrol_svn) and marked as RTBC by one of the module maintainers.
Resources:
* Version Control API Module ( http://drupal.org/project/versioncontrol)
* Version Control API -- CVS Backend ( http://drupal.org/project/versioncontrol_cvs )
* Version Control API -- SVN Backend (http://drupal.org/project/versioncontrol_svn)
* Standalone Subversion module ( http://drupal.org/project/subversion)
* Subversion book (http://svnbook.red-bean.com/en/1.4/index.html)
Contact:
* chx ( http://drupal.org/user/9446)
* jpetso (http://drupal.org/user/56020)
Comments
Comment #1
jpetso commentedThis issue on Google's GHOP issue tracker: http://code.google.com/p/google-highly-open-participation-drupal/issues/...
Claimed by cwgordon. (Go Charlie go!)
Comment #2
webchickThat's been bugging me. :P
Comment #3
jpetso commentedAs can be read in the Google issue tracker, cwgordon didn't get to implement this task for GHOP, so this issue can be closed. The good news, of course, is that I finally got to implement the basic module by myself, and you get a Subversion backend despite this issue not being fixed :)