VCS wrapper development
First published at Thursday 4 December 2008
Warning: This blog post is more then 16 years old – read and use with care.
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.
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.
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:
SVN
Using the SVN command line interface
Using the PHP extension pecl/svn
CVS, using the CVS command line client, contributed by Manuel Pichler
GIT, using the GIT command line client
Archive, using the ZipArchive PHP class
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.
Subscribe to updates
There are multiple ways to stay updated with new posts on my blog: