Writing CVS-related software in various languages
This page is aimed at helping you write CVS-related software in a variety of programming languages, with a focus on API's which let you call CVS in a manner which may be somewhat cleaner than spawning the CVS command line client as a subprocess.
C/C++
One common approach is to start with the code from the CVS command line client, and modify it as needed. This is the approach taken by MacCVS/WinCVS and gCVS. As far as I know, no one has done a lot of work in terms of trying to separate the "client library" from the command-line specific functionality with some kind of API separating them.
C++
Might be worth a look at whether MacCVSClient has code worth borrowing. I don't happen to know whether the part you'd want to borrow is well-separated from the rest, nor how easy it would be to port this code beyond the Macintosh.
perl
For a few examples, see scripts for cvs annotate and cvs admin -t.
Or another tack is to access CVS via the VCS module. Here are a few thoughts about how a CVS module might be done (which probably don't have anything to do with how VCS does it).
Java
The classes from jCVS which access CVS are usable in other applications. For example see the jCVS servlet at that page.
ECMAscript (javascript)
Our DOM page has a few ideas on getting CVS data from ECMAscript. Some of the ideas, if not all the details, suggested there should be usable in vanilla ECMAscript as well as DOM-enabled ECMAscript.
Or for another approach, the Rhino/LiveConnect products let one call Java code from Javascript, and one can use the jCVS classes to access CVS. This is apparently fairly clean.
Python
One interesting suggestion is to use the classes from jCVS along with JPython. This seems to me like it might be a pretty cool way to do it.
For more information
For more information on JPython (or Python in general) see the Python page maintained by the Python Software Activity.
![[Cyclic Home]](../cyclic-pages/cyclichome.gif)
![[ Valid XHTML 1.0! ]](/branding/w3c-valid-xhtml10-44x16.png)
![[ Valid CSS! ]](/branding/w3c-valid-css-44x16.png)
