CVS (Concurrent Versions System) [L1 ] is one of many SCM packages available in the source development community. It boasts a canonical online manual and FAQ, along with much else [L2 ].
It is quite frequently used in the Tcl community because of its use at SourceForge; this site includes tutorials that help CVS beginners.
Instructions on retrieving the Tcl/Tk source from the SourceForge CVS server are available from http://sourceforge.net/cvs/?group_id=10894 for Tcl and http://sourceforge.net/cvs/?group_id=12997 for Tk.
See also CVS Best Practices. Also, this [L3 ] book review has background material on the technology.
Consider using some other SCM package for new code.
CVS has some weaknesses (especially with consistency of changes) that other, later SCMs don't.
Here are a few packages written in Tcl and/or Tk that interact with CVS.
What: cvsversion Where: http://www.dedasys.com/freesoftware/ Description: Tcl script that recursively searches CVS/Entries files and compares them with a save file. If a different is found, you are asked if you would like to increment the major, minor, or point number of the release, and then stores the new information in a VERSION file. Updated: 09/2000 Contact: mailto:[email protected]
What: FastWeb Where: http://www.compiler-factory.com/index_FastWeb_E.html Description: Framework for creating and managing multi-language HTML WWW projects. Depends on Tcl to glue together M4, WEEX, CVS, HTML TIDY, make-type functionality, etc. Updated: 09/2001 Contact: mailto:[email protected]
What: Graphical Interface to CVS (Chan) Where: From the contact Description: Software Engineering Class project. Contact: mailto:[email protected] (Tony Chan)
What: Graphical Interface to CVS (Marwood) Where: ftp://ftp.cpsc.ucalgary.ca/pub/projects/grouplab/software/gic-1.2b1.tar.Z Description: GIC is a Tk interface to the Concurrent Version System, a revision control system. Contact: mailto:[email protected] (David Marwood) mailto:[email protected]
What: Makedist Where: http://www.purl.org/NET/akupries/soft/makedist/ Description: A tool to help generate distributions from a source code repository such as CVS, automating as much as possible. V2.0 requires Tcl 8.x . Updated: 11/1998 Contact: mailto:[email protected] (Andreas Kupries)
What: RAD/CVS Where: http://www.radsoft.com/radcvs/ http://www.indirect.com/www/radsoft/radcvs/ Description: RAD/CVS is an object-oriented, Tcl interface to the Concurrent Versions System (CVS). The RAD/CVS Tcl Interface implements an abstract interface that is not dependent upon CVS and could conceivably be implemented using other underlying implementations (e.g. RCS, SCCS, PVCS). Has a Tk/Tix interface. Available for non-commercial use only. Updated: 07/2000 Contact: mailto:[email protected] (John Goodsen)
What: rcsview Where: ftp://ftp.pmg.lcs.mit.edu/pub/andru/rcsview-1.2.tar.gz Description: A Tk viewer for RCS or CVS files. It highlights text according to the version from which it comes. Contact: mailto:[email protected] (Andrew Myers)
What: Tcl Developer Studio Where: http://www.star.spb.ru/%7Esmall/tcldev/ http://www.star.spb.ru/%7Esmall/tcldev/download/tcldev-1.0.tar.gz Description: Environment for Tcl/Tk developers. Provides multi-file editor with syntax indenting, highlighting, find functions, CVS control interface, simple project support, printing fast file navigation. Updated: 07/1999 Contact: mailto:[email protected]
What: TIDE Where: http://www.t-ide.com/ http://www.eolas.com/tcl/tide/download.html Description: Commercial Tcl/itcl Integrated Development Environment (IDE) for single users. Lets you manage your projects, navigate the source, and browse your symbols. Supports project management, smart editor aboe to navigate thru project, interfaces to RCS and CVS source repositories, interface to Tuba debugger, diff/merge against repository, cross reference for symbols, about to search against projects, symbol browser, byte compiler, lint, and package mechanism. Supports Linux, Solaris, HP-UX, AIX. Version 1.5 is now available. Updated: 05/1999 Contact: mailto:[email protected] (Ing. Hans-Michael Haschek) mailto:[email protected]
What: WinCVS Where: http://www.wincvs.org/ Description: CVS interface for Windows. Reported on comp.lang.tcl to rely on Tcl. Appears to be a C++ application depending on CVS DLLs. Updated: 02/2000 Contact: mailto:[email protected]
You can format CVS or RCS log entries into a ChangeLog format using log2changelog
[Other approaches:
[open "|cvs -d $cvsroot init" RDWR] and talking to cvs along pipes. speaking direct CVS protocol through [socket].
]
Will this really work? If cvs asks for my password, can I really check for that and send it back down the pipe?
Well, yes, you can. If however there is going to be very much interaction, or if the strings being examined are going to be very complex, I (LV) would recommend looking at Expect as a Tcl extension to make the interaction a bit easier.
Vince: Can you provide a simple example of a script which will check for a password request and send that back down the pipe? Nothing complex, just, say the equivalent of 'cvs -z5 update -d $cvsroot ChangeLog', type password, and we're done.
See Pipes vs Expect
04feb03 jcw - There are docs about the protocol at http://www.elegosoft.com/cvs/cvsclient.html
RS: For reproducible experiments, here's a snippet to show how a script can log which CVS version it is (or what differences it has from CVS HEAD):
set here [pwd] cd [file dirname [info script]] set this [file tail [info script]] set status [exec cvs status $this] puts $status if ![regexp "Status: Up-to-date" $status] { catch {exec cvs diff $this} diff puts $diff } cd $here #-- script itself follows here…
"CVS news"
Tclers use TortoiseCVS and WinCVS as Windows-hosted CVS clients.