IntroductionThis little package provides a Tcl wrapper for the cvs client. Download- Download the ::jem::cvs package at http://es.gnu.org/~jemarch/downloads/tcl/cvs.tcl Usage exampleThe following tcl script (used on my own machines) makes use of the ::jem::cvs package in order to update a directory with org-mode files. #!/usr/bin/tclsh # This code is in the public domain lappend auto_path [file join ~ lib] package require cvs ;# Get org files from server variable org_base [file join ~ tmp org] ;# Initialize CVS context ::jem::cvs::init \ ext \ jemarch \ es.gnu.org \ /home/jemarch/cvsroot ;# co or update the org database if {![file exist $org_base]} then { ;# Make a checkout cd [file join $org_base ..] ::jem::cvs::checkout org } else { ;# Make an update cd [file join $org_base] ::jem::cvs::update ;# Beware of conflicts! if {[::jem::cvs::conflicts_p]} then { puts "Conflicts while updating: $::jem::cvs::conflict_files" exit 1 } } ::jem::cvs::print_results ;# Local Variables: ;# mode: tcl ;# End: |