User Tools

Site Tools


sourceforge:cvs

Cvs

CVS is a revision control system, just like RCS, GIT and Subversion (SVN) are.
Though the current Crossfire repository is maintained by svn, it is possible to access the old cvs archive,
which could be of interest, since the change towards svn did just upload the client, server and arch modules
until between svn revision 1450 and 1500, when the sound and map modules were added.
Until the maps were added to the svn repository, several Crossfire releases were introduced, and as of year 2018 still available for download.

Cvs is basically a command line tool with syntax as:

 cvs -d:pserver:anonymous@crossfire.cvs.sourceforge.net:/cvsroot/crossfire co

Several modules (folders) are available :

  1. CVSROOT – 1 MB
  2. CFJavaEditor – 9 MB
  3. arch – 48 MB
  4. iso_arch – 24 MB
  5. alternate_images – 7 MB
  6. client – 6 MB
  7. cfclient_sdl – 5 MB
  8. jxclient – 12 MB
  9. crossfire – the server - 23 MB
  10. maps – 47 MB
  11. maps-bigworld – 169 MB
  12. sounds – 1 MB

These modules can be checked out by the following syntax :

cvs $CVS_OPTS -d:pserver:anonymous@crossfire.cvs.sourceforge.net:/cvsroot/crossfire co -P <module_name>

Script

A bash script to checkout the modules one by one.
The cvs server on SF is pretty lazy, therefore the script attempts MAX_RETRIES on each of the modules.
The script is expected to be placed and run outside of a folder named ' crossfire_cvs ' .

#!/bin/ash
 
CVS_OPTS="-z 7" # '-z9'
MAX_RETRIES=10
 
ERROR=${ERROR:=1}
ERR=${ERR:-$ERROR} #ERR var already used as /dev/null OR /dev/stderr
_err(){
test "$ERROR" || return 0
echo -e "$0:ERROR:$*"  >&2
}
 
_exit(){
local RV
test "$*" || { _err "Usage:_exit EXITCODE MESSAGE"; }
RV=$1
[ "${RV//[[:digit:]]/}" ] && { _err "\$1 must be a digit number."; RV=255; } || shift
echo "$*" >&2
case ${MY_SELF##*/} in
ash*|bash*|sh*) return $RV;;
*) exit $RV;;
esac
}
 
MY_SELF=`realpath "$0"`
MY_DIR=${MY_SELF%/*}
cd "$MY_DIR" || _exit 3 "Could not change into '$MY_DIR'/ ."
 
cd crossfire_cvs || _exit 3 "Could not change into crossfire_cvs/ ."
 
 
trap "pidof cvs && kill -2 `pidof cvs`" INT
 
for d in CVSROOT CFJavaEditor arch client iso_arch \
 alternate_images cfclient_sdl crossfire jxclient \
 maps maps-bigworld sounds
do mkdir $VERB -p $d
done
 
MODULES=`ls -1`
test "$MODULES" || _exit 3 "No cvs modules available."
 
for module in $MODULES
 
do
 
 c=0
 while :; do
 cvs $CVS_OPTS -d:pserver:anonymous@crossfire.cvs.sourceforge.net:/cvsroot/crossfire co -P $module
 RV=$?
 test $RV = 0 && break 1
 echo Returnvalue $?
 echo
 c=$((c+1))
 test $c -ge ${MAX_RETRIES:-10} && break 1
 sleep 12
 done
 
sleep 12
done
sourceforge/cvs.txt · Last modified: 2018/04/23 19:05 by karl