VCS wrapper development - Kore Nordmann

VCS wrapper development

Since arbit 0.1 is nearly done and will be released soonish, we already started with some library development to fullfil our goals for the 0.2 release. The main item on the roadmap is the support for code in version control systems (VCS), which includes the possibility to integrate Continuous Integration, API Documentation etc., in arbit.

We looked around but could not find a good abstraction layer for different VCS so we started with our own. We only need one for reading the contents of VCS, but be able to support as many VCS as possible.

VCS wrapper class diagramVCS wrapper class diagram

We are using the abstract concepts of files and directories, implementing various interfaces, which describe what the VCS actually supports. An extract from the class diagram can be found on the right.

I founded Qafoo together with two other Arbit contributors, and beside consulting and training around high quality PHP software we provide commercial support for Arbit and other software quality related tools.

Already supported

The source runs on PHP 5.2 (and of course 5.3), to enable a wide adoption, and already supports the following VCS:

Each wrapper has special requirements, like the installed extensions or CLI tools. The core itself only depends on a default PHP 5.2 installation - it uses the default modules SPL, xmlreader (SVN-Cli), PCRE and optionally SQLite3 for faster caching of the version control metadata cache metadata.

The wrapper has been developed test-driven and has a quite high test coverage. But there may still be some special issues inside the VCS, which we were not aware of while developing this first version.

A basic overview, the original design document can both be found inside the wiki in the issue tracker for the project.

Download and test

There is no release yet, but you can check it out from SVN. We would like to ask you to test the VCS wrapper and maybe provide implementations for your favourite VCS. The source code is licensed under LGPL 3, so you should be able to integrate it in your tools.