Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

# Script to push the changes made to a directory tree into a CVS
# repository, by James Blackwell and David McCabe.  We release this
# file into the public domain.

# We assume that $DESTCVS is already a CVS working directory
# that has been checked out from $CVSROOT.

## Parameters:

export CVS_RSH=ssh
export CVSROOT=you@yourhost:/cvs/yourproject

SOURCEBRANCH=~/your-bzr-branch
DESTCVS=~/tmp/project-cvs

EXCLUDE="--exclude='.bzr*' --exclude=CVS"

## End of parameters.


rsync -av $EXCLUDE --delete $SOURCEBRANCH $DESTCVS
echo 'rsync finished.'

pushd $DESTCVS

# cvs -n -q update is really a concisely-formatted status report.
STAT="cvs -n -q update"

while [[ -n `$STAT | grep "^[U?]"` ]]
do
  $STAT|grep "^? "|sed 's/? \+//'|xargs -n1 -iunknown cvs add "unknown"
  $STAT|grep "^U "|sed 's/U \+//'|xargs -n1 -iunknown cvs remove "unknown"
done

echo 'about to cvs commit.'
cvs commit -m "This CVS repository is only an echo of a bzr branch; See the bzr logs for real information."