]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Robert Collins <robertc@robertcollins.net>
authorHenrik Nordstrom <hno@squid-cache.org>
Fri, 7 Mar 2008 22:10:03 +0000 (15:10 -0700)
committerHenrik Nordstrom <hno@squid-cache.org>
Fri, 7 Mar 2008 22:10:03 +0000 (15:10 -0700)
This is most of a changeover of scripts for squid 3 trunk to use bzr;
the missing bit appears to need a bzr 1.1 (to do 'rdiff' basically) or
thereabouts, I'll look into that in a bit. I'm not sure that the
unconverted cvs calls will actually trigger with our current setup or
not.

configure.in
mkrelease.sh
mksnapshot.sh

index 25af2c5085c6424dae0ec6f11be0c58cc7e0012c..d3e602b1d126af16aff8efc922ef602cea2e9d95 100644 (file)
@@ -5,7 +5,7 @@ dnl  $Id: configure.in,v 1.497 2008/02/17 09:24:49 serassio Exp $
 dnl
 dnl
 dnl
-AC_INIT(Squid Web Proxy, 3.HEAD-CVS, http://www.squid-cache.org/bugs/, squid)
+AC_INIT(Squid Web Proxy, 3.HEAD-BZR, http://www.squid-cache.org/bugs/, squid)
 AC_PREREQ(2.52)
 AM_CONFIG_HEADER(include/autoconf.h)
 AC_CONFIG_AUX_DIR(cfgaux)
index 1884bf7fe6b7994ef97637cb6a61efe397a87204..42cd33dae4b3d71571f95c93afd0178d51a735db 100755 (executable)
@@ -3,8 +3,12 @@ if [ $# -ne 1 -a $# -ne 2 ]; then
        echo "Usage: $0 revision [destination]"
        exit 1
 fi
-package=squid
+# VCS details
 module=squid3
+BZRROOT=${BZRROOT:-/bzr}
+
+# infer tags from command line details
+package=squid
 rev=`echo $1 | sed -e "s/^${package}-//"`
 name=${package}-${rev}
 tag=`echo ${name} | tr a-z.- A-Z__`
@@ -24,32 +28,29 @@ fi
 
 tmpdir=${TMPDIR:-${PWD}}/${name}-mkrelease
 
-CVSROOT=${CVSROOT:-/server/cvs-server/squid}
-export CVSROOT
-
 rm -rf $name.tar.gz $tmpdir
 trap "rm -rf $tmpdir" 0
 
-cvs -Q export -d $tmpdir -r $tag $module
+bzr export $tmpdir $BZRROOT/$module/tags/$tag || exit 1
 if [ ! -f $tmpdir/configure ]; then
        echo "ERROR! Tag $tag not found in $module"
 fi
 
 cd $tmpdir
-eval `grep "^ *VERSION=" configure | sed -e 's/-CVS//'`
+eval `grep "^ *VERSION=" configure | sed -e 's/-BZR//'`
 eval `grep "^ *PACKAGE=" configure`
 if [ ${name} != ${PACKAGE}-${VERSION} ]; then
-       echo "ERROR! The version numbers does not match!"
+       echo "ERROR! The tag and configure version numbers do not match!"
        echo "${name} != ${PACKAGE}-${VERSION}"
        exit 1
 fi
 RELEASE=`echo $VERSION | cut -d. -f1,2 | cut -d- -f1`
 ed -s configure.in <<EOS
-g/${VERSION}-CVS/ s//${VERSION}/
+g/${VERSION}-BZR/ s//${VERSION}/
 w
 EOS
 ed -s configure <<EOS
-g/${VERSION}-CVS/ s//${VERSION}/
+g/${VERSION}-BZR/ s//${VERSION}/
 w
 EOS
 ed -s include/version.h <<EOS
index 29844aee21acc41fbba25fa9b5410b44cab8cb61..0568a66c0f28ec2670e42618d29b53682546846c 100755 (executable)
@@ -1,36 +1,46 @@
 #!/bin/sh -e
+
 if [ $# -gt 1 ]; then
        echo "Usage: $0 [branch]"
+       echo "Where [branch] is the path under /bzr/ to the branch to snapshot."
        exit 1
 fi
+# VCS details
 module=squid3
-tag=${1:-HEAD}
+BZRROOT=${BZRROOT:-/bzr}
+
+# generate a tarball name from the branch ($1) note that trunk is at
+# /bzr/trunk, but we call it HEAD for consistency with CVS (squid 2.x), and
+# branches are in /bzr/branches/ but we don't want 'branches/' in the tarball
+# name so we strip that.
+tag="HEAD"
+branchpath=${1:-trunk}
+if [ "trunk" != "$branchpath" ]; then
+    tag=`echo $branchpath | sed -e "s/^branches\///"`
+fi
 startdir=$PWD
 date=`env TZ=GMT date +%Y%m%d`
 
 tmpdir=${TMPDIR:-${PWD}}/${module}-${tag}-mksnapshot
 
-CVSROOT=${CVSROOT:-/server/cvs-server/squid}
-export CVSROOT
-
 rm -rf $tmpdir
 trap "rm -rf $tmpdir" 0
 
 rm -f ${tag}.out
-cvs -Q export -d $tmpdir -r $tag $module
+bzr export $tmpdir $BZRROOT/$branchpath || exit 1
 if [ ! -f $tmpdir/configure ]; then
        echo "ERROR! Tag $tag not found in $module"
 fi
 
 cd $tmpdir
-eval `grep "^ *VERSION=" configure | sed -e 's/-CVS//'`
+eval `grep "^ *VERSION=" configure | sed -e 's/-BZR//'`
 eval `grep "^ *PACKAGE=" configure`
 ed -s configure.in <<EOS
-g/${VERSION}-CVS/ s//${VERSION}-${date}/
+g/${VERSION}-BZR/ s//${VERSION}-${date}/
 w
 EOS
 ed -s configure <<EOS
-g/${VERSION}-CVS/ s//${VERSION}-${date}/
+g/${VERSION}-BZR/ s//${VERSION}-${date}/
 w
 EOS