Svk

From WxWiki

Jump to: navigation, search

Here's a script you can use (from cron) to sychronize a local svk depot with wxWidgets cvs.

I use it to maintain two depots, CVSHEAD and WX_2_6_BRANCH, and run the script once an hour. Then if I want a local working copy, I can use "svk co", and "svk up" which are both instaneous. I then use "svk diff" to produce a patch file, which I apply to the "CVSHEAD-COMMIT" branch, and do a "cvs ci" (if you don't have cvs write access, drop that bit of the script off, and just send the patch to sourceforge). A little later, the patch will appear in the svk repository, and an "svk up" will eliminate the local diff.

I need to write this documentation up a bit further, but that's the basic idea.


#!/usr/bin/env bash
 
cd /home/amb/camelot/wxWidgets
 
echo [`date`]: Sync started
 
while getopts ":u:a:s:v" options; do
	case $options in
		q ) quiet="-q";;
	esac
done
 
for item in CVSHEAD WX_2_6_BRANCH
do
	pushd cvs/$item/wxWidgets
	cvs -Q update -dP
	popd
	rsync -aC $quiet cvs/$item clean
	svk import -m "auto import //mirror/$item from cvs" //mirror/wxWidgets/$item clean/$item/wxWidgets
done
 
pushd cvs/CVSHEAD-COMMIT/wxWidgets
cvs -Q update -dP
popd
 
echo [`date`]: Sync finished
Personal tools