[Jpackage-commits] dist/common cvs-import.sh,1.5,1.6

jpackage jpackage at ryu.zarb.org
Mon May 26 22:09:35 CEST 2008


Update of /home/projects/jpackage/cvs/dist/common
In directory ryu.zarb.org:/tmp/cvs-serv28710

Modified Files:
	cvs-import.sh 
Log Message:
Merge some more bits that seem necessary

Index: cvs-import.sh
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/common/cvs-import.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** cvs-import.sh	26 May 2008 19:44:55 -0000	1.5
--- cvs-import.sh	26 May 2008 20:09:33 -0000	1.6
***************
*** 146,149 ****
--- 146,158 ----
  trap "rm -rf $TMPDIR" 0 9 15
  
+ echo "Checking out the CVSROOT..."
+ cd $TMPDIR
+ $CVS -Q checkout CVSROOT || {
+     echo "ERROR: Could not check out the CVSROOT from $CSVROOT"
+     exit 1
+ }
+ # keep a reference to this checkout
+ MODDIR="$TMPDIR/CVSROOT"
+ 
  # A cleanup function that can be called from random places
  CleanUp() {
***************
*** 182,185 ****
--- 191,215 ----
  }
  
+ # First, make sure we track this package accordingly
+ cd $MODDIR
+ cvs -Q update modules
+ 
+ # Now make sure we have the requested to operate on a branch
+ if [ -n "$BRANCH" ] ; then
+     # check that this branch exists before importing anything into it
+     if [ -z "$(grep ""^$NAME-$BRANCH[[:space:]]"" modules 2>/dev/null)" ] ; then
+ 	# XXX: allow the creation of branches
+ 	cat <<EOF
+ ERROR: You have requested to import a package into the branch $BRANCH of the
+ module $NAME, but according to the modules file this branch does not exist.
+ 
+ This tool allows you to import packages only on pre-existing branches. If you
+ would like the new branch created, please email release-engineering at redhat.com.
+ 
+ EOF
+ 	exit -1
+     fi
+ fi
+ 
  # Figure out if we need to import a new module
  if [ -z "$(grep ""^$NAME[[:space:]]"" modules 2>/dev/null)" ] ; then




More information about the JPackage-commits mailing list