[tuhopuu-devel] CVS merge & ISO 9000 certification
Chris Want
tuhopuu-devel@blender.org
Mon, 02 Aug 2004 16:10:22 -0600
Well, OK, the one thing good that came out of today's merge
was that I was able to document fairly extensively the steps
I took to do the merge just in case I get hit by a truck and
I am no longer able to do it (or more likely, if I foresake
technology and go live in the forest).
Here are the instructions on how today's merge was
accomplished:
#########################
## How to do the bf-blender-->tuhopuu cvs merge
##
## Notes:
## * Do not run this as a script ... that would be mad
## * Make sure you have adequate disk space
#########################
#########################
## Some variables that are particular to this merge and development setup.
## These *must* be edited.
## I'm going to prefix each variable with M_ so they are easy to grep.
export M_NEW_DATE=2004_08_02
export M_OLD_DATE=2004_07_03
export M_TUHOPUU_DIR=${HOME}/blender/des_src/tuhopuu2
export M_TMP_DIR=/tmp
# note: M_CVS_USER_BF may be anonymous, but M_CVS_USER_TUHOPUU may not
export M_CVS_USER_BF=hos
export M_CVS_USER_TUHOPUU=hos
export M_EDITOR=emacs
#########################
## Some variables that ensure consistency between merges
export M_NEW_DATE_SLASHES=`echo ${M_NEW_DATE} | sed 's:_:/:g'`
export M_NEW_PREMERGE_TAG=PREMERGE_${M_NEW_DATE}
export M_OLD_PREMERGE_TAG=PREMERGE_${M_OLD_DATE}
export M_VENDOR_TAG=BLENDER_DIST
export M_NEW_RELEASE_TAG=BLENDER_CVS_${M_NEW_DATE}
export M_OLD_RELEASE_TAG=BLENDER_CVS_${M_OLD_DATE}
#########################
## Tag our tuhopuu dev sources so we can roll back if the unthinkable
happens
cd ${M_TUHOPUU_DIR}
cvs -z3 up -Pd
cvs tag -c ${M_NEW_PREMERGE_TAG}
#########################
## Export the bf-blender sources and import them into tuhopuu as a new
release
cd ${M_TMP_DIR}
cvs -z3 -d:pserver:${M_CVS_USER_BF}@cvs.blender.org:/cvsroot/bf-blender \
export -D now blender
mv blender blender-export
cd blender-export
(cvs -z3 -d:pserver:${M_CVS_USER_TUHOPUU}@cvs.blender.org:/cvsroot/tuhopuu \
import -m "Merge of Blender/cvs ${M_NEW_DATE_SLASHES}" tuhopuu2 \
${M_VENDOR_TAG} ${M_NEW_RELEASE_TAG} \
2>&1) > ${M_TMP_DIR}/merge-${M_NEW_DATE}.txt &
# (takes a while ... check the output with tail -f if impatient)
#########################
## Deal with conflict resolution, etc
cd ${M_TMP_DIR}
(cvs -z3 -d:pserver:${M_CVS_USER_TUHOPUU}@cvs.blender.org:/cvsroot/tuhopuu \
checkout -kk -j${M_OLD_RELEASE_TAG} -j${M_NEW_RELEASE_TAG} \
tuhopuu2 2>&1) > ${M_TMP_DIR}/merge-${M_NEW_DATE}__2.txt &
mv tuhopuu2 tuhopuu2-merge
cd tuhopuu2-merge
#########################
## OK, we are l33t and we are lazy -- lets create a script that will
## run our favorite editor on every file that needs checking (note:
## there will probably be a few *hundred* of these).
cvs -z3 -q up -Pd | grep ^C > ${M_TMP_DIR}/merge-${M_NEW_DATE}__3.txt &
sed "s/^C/${M_EDITOR}/" < ${M_TMP_DIR}/merge-${M_NEW_DATE}__3.txt \
> ${M_TMP_DIR}/conflict-edit-${M_NEW_DATE}.sh
sh ${M_TMP_DIR}/conflict-edit-${M_NEW_DATE}.sh
# An editor will now spawn for each file with a conflict ... fix the
# conflicts then commit the code.
cvs -z3 commit
#########################
## Clean up to reclaim disk space
cd ${M_TMP_DIR}
rm -rf ${M_TMP_DIR}/blender-export
rm -rf ${M_TMP_DIR}/tuhopuu2-merge