#!/bin/sh # The next line is the only line you should need to adjust. SVNDIR=/tmp/svn/bin SVN=${SVNDIR}/svn SVNSERVE=${SVNDIR}/svnserve SVNADMIN=${SVNDIR}/svnadmin URL=file:///`pwd`/repos rm -rf repos wc* import-me ${SVNADMIN} create repos echo "### Making a Greek Tree for import..." mkdir import-me mkdir import-me/trunk mkdir import-me/tags mkdir import-me/branches mkdir import-me/trunk/A mkdir import-me/trunk/A/B/ mkdir import-me/trunk/A/C/ mkdir import-me/trunk/A/D/ mkdir import-me/trunk/A/B/E/ mkdir import-me/trunk/A/B/F/ mkdir import-me/trunk/A/D/G/ mkdir import-me/trunk/A/D/H/ echo "This is the file 'iota'." > import-me/trunk/iota echo "This is the file 'A/mu'." > import-me/trunk/A/mu echo "This is the file 'A/B/lambda'." > import-me/trunk/A/B/lambda echo "This is the file 'A/B/E/alpha'." > import-me/trunk/A/B/E/alpha echo "This is the file 'A/B/E/beta'." > import-me/trunk/A/B/E/beta echo "This is the file 'A/D/gamma'." > import-me/trunk/A/D/gamma echo "This is the file 'A/D/G/pi'." > import-me/trunk/A/D/G/pi echo "This is the file 'A/D/G/rho'." > import-me/trunk/A/D/G/rho echo "This is the file 'A/D/G/tau'." > import-me/trunk/A/D/G/tau echo "This is the file 'A/D/H/chi'." > import-me/trunk/A/D/H/chi echo "This is the file 'A/D/H/omega'." > import-me/trunk/A/D/H/omega echo "This is the file 'A/D/H/psi'." > import-me/trunk/A/D/H/psi echo "### Done." echo "" echo "### Importing it..." (cd import-me; ${SVN} import -q -m "Initial import." ${URL}); echo "### Done." echo "" ${SVN} co -q ${URL}/trunk wc1 ${SVN} co -q ${URL}/trunk wc2 echo "### In wc1, edit and commit A/B/E/alpha ..." echo "Edit file 'A/B/E/alpha'." > wc1/A/B/E/alpha ${SVN} ci -m "Edit from wc1" wc1 echo "### Done." echo "" echo "### In wc2, rename A/B/E to A/B/E1 ..." ${SVN} mv wc2/A/B/E wc2/A/B/E1 echo "### update wc2, creating tree conflict ..." ${SVN} up wc2 ${SVN} st wc2 echo "### In wc2, merge change from r2 to renamed file ..." ${SVN} merge ${URL}/trunk/A/B/E wc2/A/B/E1 echo "### In wc2, mark conflict resolved ..." ${SVN} resolve --accept=working wc2/A/B/E ${SVN} st wc2 echo "### In wc2, commit rename" ${SVN} ci -m "Edit from wc2" wc2