# e4 only needs to stabilize 4 tags, R0_10, R4_0, R0_11, and R4_1 # we can do that with a much simpler command line cvs rtag -D"07/28/2010 00:00" R4_0 e4/org.eclipse.e4.ui >tag40_log.txt 2>&1 # we use "06/21/2011 00:00" for R4_1 # R0_10 was applied to everything # R4_1 was correctly applied # R0_11 was correctly applied # R4_1_maintenance was never branched in e4/org.eclipse.e4.ui # R4_1_maintenance was branched but I think that needs to be converted by itself # -> e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench # create a local cvs root # I did this on build.eclipse.org cd /shared/eclipse/e4/git/cvs mkdir cvsroot.e4.ui cvsroot.e4.platform.ui cvsroot.e4.platform.runtime cvsroot.e4.compat cvsroot.e4.tools cd cvsroot.e4.ui cvs -d :local:$(pwd) init # copy over from modules copy_e4.sh org.eclipse.migration/eclipse.platform.ui.e4/pass1/modules_e4_ui.sh $(pwd)/cvsroot.e4.ui copy_e4.sh org.eclipse.migration/eclipse.platform.ui.e4/pass1/modules_platform_ui.sh $(pwd)/cvsroot.e4.platform.ui copy_e4.sh org.eclipse.migration/eclipse.platform.ui.e4/pass1/modules_platform_runtime.sh $(pwd)/cvsroot.e4.platform.runtime copy_e4.sh org.eclipse.migration/eclipse.platform.ui.e4/pass1/modules_compat.sh $(pwd)/cvsroot.e4.compat cp -r /cvsroot/eclipse/e4/org.eclipse.e4.tools/ cvsroot.e4.tools/e4 # fix up the compat tests that moved into platform ui cd cvsroot.e4.platform.ui/e4 mv org.eclipse.e4.compatibility/tests/* org.eclipse.e4.ui/tests mv org.eclipse.e4.compatibility/features/org.eclipse.e4.rcp/ org.eclipse.e4.ui/features #confirm there's nothing else in there find org.eclipse.e4.compatibility/ -type f # clean the CVS repo of links for f in cvsroot.e4.* ; do find $f -type l|xargs -n 1 rm; done # Make sure the author IDs in the options files are up to date. # for this test, I stayed on build.eclipse.org # can be done on a local machine, if you cp the cvsroot over. # get the cvs2git tool svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk # for each repo you need to create: eclipse.platform.ui.e4/pass1/c2g_compat.options eclipse.platform.ui.e4/pass1/c2g_e4_ui.options eclipse.platform.ui.e4/pass1/c2g_platform_runtime.options eclipse.platform.ui.e4/pass1/c2g_platform_ui.options eclipse.platform.ui.e4/pass1/c2g_tools.options # run the cvs2git tool rm -rf cvs2svn-tmp symbol-info.txt cvs2svn-trunk/cvs2git --options=org.eclipse.migration/eclipse.platform.ui.e4/pass1/c2g_compat.options # create a git repo git init --shared eclipse.platform.ui.compat # try the fast import cd eclipse.platform.ui.compat cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import # move the tags into a useful place python ../cvs2svn-trunk/contrib/git-move-refs.py # Prune and pack the repo git prune git repack -a -d --depth=250 --window=250 git gc --aggressive git repack -a -d --depth=250 --window=250 # verify the repo - this can take long, so for your first test skip this step. mkdir compare-tmp python $(pwd)/cvs2svn-trunk/contrib/verify-cvs2svn.py \ --git $(pwd)/cvsroot/eclipse.platform.ui \ $(pwd)/eclipse.platform.ui \ --tmp=$(pwd)/compare-tmp --diff >compare-log.txt 2>&1 & # Fixing the Delete only tags: /bin/bash ../org.eclipse.migration/scripts/fix_tags.sh >../tag_report_compat.sh grep ^git ../tag_report_compat.sh >../mv_tags_compat.sh # examine them /bin/bash ../mv_tags_compat.sh # copy reports into the correct org.eclipse.migration/.../pass directory for later. cd .. git clone --bare eclipse.platform.ui.compat eclipse.platform.ui.compat.git cd eclipse.platform.ui.compat.git git remote rm origin # check that it is shared git config -l git config --add core.sharedrepository 1 # copy it to git root, must be done from pwebster ssh build.eclipse.org /bin/cp -r /shared/eclipse/e4/git/cvs/eclipse.platform.ui.compat.git /home/data/users/pwebster ssh dev.eclipse.org /bin/cp -r /home/data/users/pwebster/eclipse.platform.ui.compat.git /gitroot/e4 # now it should be a public test repo: ssh://pwebster@git.eclipse.org/gitroot/e4/eclipse.platform.ui.compat.git # Finish the other repos: rm -rf cvs2svn-tmp symbol-info.txt cvs2svn-trunk/cvs2git --options=org.eclipse.migration/eclipse.platform.ui.e4/pass1/c2g_e4_ui.options git init --shared org.eclipse.ui.e4 cd org.eclipse.ui.e4 cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import python ../cvs2svn-trunk/contrib/git-move-refs.py git prune git repack -a -d --depth=250 --window=250 git gc --aggressive git repack -a -d --depth=250 --window=250 /bin/bash ../org.eclipse.migration/scripts/fix_tags.sh >../tag_report_e4_ui.sh grep ^git ../tag_report_e4_ui.sh >../mv_tags_e4_ui.sh # examine them /bin/bash ../mv_tags_e4_ui.sh rm t1.txt # scp the results to the correct org.eclipse.migration/../pass directory scp e4Build@build.eclipse.org:/shared/eclipse/e4/git/cvs/*.sh eclipse.platform.ui.e4/pass1 cd .. git clone --bare org.eclipse.ui.e4 org.eclipse.ui.e4.git cd org.eclipse.ui.e4.git git remote rm origin # check that it is shared git config -l git config --add core.sharedrepository 1 # copy it to git root, must be done from pwebster ssh build.eclipse.org /bin/cp -r /shared/eclipse/e4/git/cvs/org.eclipse.ui.e4.git /home/data/users/pwebster ssh dev.eclipse.org /bin/cp -r /home/data/users/pwebster/org.eclipse.ui.e4.git /gitroot/e4 rm -rf cvs2svn-tmp symbol-info.txt cvs2svn-trunk/cvs2git --options=org.eclipse.migration/eclipse.platform.ui.e4/pass1/c2g_platform_runtime.options git init --shared eclipse.platform.runtime.e4 cd eclipse.platform.runtime.e4 cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import python ../cvs2svn-trunk/contrib/git-move-refs.py git prune git repack -a -d --depth=250 --window=250 git gc --aggressive git repack -a -d --depth=250 --window=250 /bin/bash ../org.eclipse.migration/scripts/fix_tags.sh >../tag_report_platform_runtime.sh grep ^git ../tag_report_platform_runtime.sh >../mv_tags_platform_runtime.sh # examine them /bin/bash ../mv_tags_platform_runtime.sh rm t1.txt # scp the results to the correct org.eclipse.migration/../pass directory scp e4Build@build.eclipse.org:/shared/eclipse/e4/git/cvs/*.sh eclipse.platform.ui.e4/pass1 cd .. git clone --bare eclipse.platform.runtime.e4 eclipse.platform.runtime.e4.git cd eclipse.platform.runtime.e4.git git remote rm origin # check that it is shared git config -l git config --add core.sharedrepository 1 # copy it to git root, must be done from pwebster ssh build.eclipse.org /bin/cp -r /shared/eclipse/e4/git/cvs/eclipse.platform.runtime.e4.git /home/data/users/pwebster ssh dev.eclipse.org /bin/cp -r /home/data/users/pwebster/eclipse.platform.runtime.e4.git /gitroot/e4 rm -rf cvs2svn-tmp symbol-info.txt cvs2svn-trunk/cvs2git --options=org.eclipse.migration/eclipse.platform.ui.e4/pass1/c2g_platform_ui.options git init --shared eclipse.platform.ui.e4 cd eclipse.platform.ui.e4 cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import python ../cvs2svn-trunk/contrib/git-move-refs.py git prune git repack -a -d --depth=250 --window=250 git gc --aggressive git repack -a -d --depth=250 --window=250 /bin/bash ../org.eclipse.migration/scripts/fix_tags.sh >../tag_report_platform_ui.sh grep ^git ../tag_report_platform_ui.sh >../mv_tags_platform_ui.sh # examine them /bin/bash ../mv_tags_platform_ui.sh rm t1.txt # scp the results to the correct org.eclipse.migration/../pass directory scp e4Build@build.eclipse.org:/shared/eclipse/e4/git/cvs/*.sh eclipse.platform.ui.e4/pass1 cd .. git clone --bare eclipse.platform.ui.e4 eclipse.platform.ui.e4.git cd eclipse.platform.ui.e4.git git remote rm origin # check that it is shared git config -l git config --add core.sharedrepository 1 # copy it to git root, must be done from pwebster ssh build.eclipse.org /bin/cp -r /shared/eclipse/e4/git/cvs/eclipse.platform.ui.e4.git /home/data/users/pwebster ssh dev.eclipse.org /bin/cp -r /home/data/users/pwebster/eclipse.platform.ui.e4.git /gitroot/e4 rm -rf cvs2svn-tmp symbol-info.txt cvs2svn-trunk/cvs2git --options=org.eclipse.migration/eclipse.platform.ui.e4/pass1/c2g_tools.options git init --shared org.eclipse.e4.tools cd org.eclipse.e4.tools cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import python ../cvs2svn-trunk/contrib/git-move-refs.py git prune git repack -a -d --depth=250 --window=250 git gc --aggressive git repack -a -d --depth=250 --window=250 /bin/bash ../org.eclipse.migration/scripts/fix_tags.sh >../tag_report_tools.sh grep ^git ../tag_report_tools.sh >../mv_tags_tools.sh # examine them /bin/bash ../mv_tags_tools.sh rm t1.txt # scp the results to the correct org.eclipse.migration/../pass directory scp e4Build@build.eclipse.org:/shared/eclipse/e4/git/cvs/*.sh eclipse.platform.ui.e4/pass1 cd .. git clone --bare org.eclipse.e4.tools org.eclipse.e4.tools.git cd org.eclipse.e4.tools.git git remote rm origin # check that it is shared git config -l git config --add core.sharedrepository 1 # copy it to git root, must be done from pwebster ssh build.eclipse.org /bin/cp -r /shared/eclipse/e4/git/cvs/org.eclipse.e4.tools.git /home/data/users/pwebster ssh dev.eclipse.org /bin/cp -r /home/data/users/pwebster/org.eclipse.e4.tools.git /gitroot/e4 # # # All of the stuff below are extra steps. # # add a .gitignore to branches you care about ... litter git with commits! :-) cd eclipse.platform.ui #contents: bin/ target/ *~ *.rej *.bak # try and generate some author data to include in the options file find org.eclipse.ui.workbench -name "*,v" -exec grep "^date.*author " {} \; >author.raw grep -v "Binary file" author.raw | sed 's/^date.*author //g' | sed 's/;.*$//g' | sort -u >author.ids for ID in $( cat author.ids ); do ENT=$( getent passwd $ID ) if [ $? -eq 0 ]; then NAME=$( echo $ENT | cut -f5 -d: ); else NAME=$ID; fi echo "'$ID' : ('$NAME', '$ID@eclipse.org')," >>author.py done # or using LDAP, better email addresses for ID in $( cat author.ids ); do ldapsearch -x -b "dc=eclipse,dc=org" -s sub "(uid=$ID)" >tmp.txt NAME=$ID EMAIL=$ID if grep "numEntries: 1\$" tmp.txt >/dev/null; then NAME=$( grep ^cn: tmp.txt | sed 's/cn: //g' ) #EMAIL=$( grep ^mail: tmp.txt | sed 's/mail: //g' ) fi echo "'$ID' : ('$NAME', '$EMAIL')," >>author.py done # maybe fix Curtis' name :-) sed "s/D'Entremont/D\\\\'Entremont/g" # add it to a bare repo git remote bareLocal ssh://e4Build@build.eclipse.org/shared/eclipse/e4/git/cvs/eclipse.platform.ui.git git push --all bareLocal git push --tags bareLocal # put it into a test location cd /gitroot/e4 git clone -l --mirror $HOME/eclipse.platform.ui.git eclipse.platform.ui.git # converting a simple map file - this does funky things as it tokenizes the line while read LINE; do if (echo $LINE | grep :pserver >/dev/null); then HDR=$( echo $LINE | cut -f1 -d= ) ID=$( echo $HDR | cut -f2 -d\@ ) TAG=$( echo $LINE | cut -f1 -d, | cut -f2 -d= ) echo "${HDR}=GIT,tag=${TAG},repo=git://git.eclipse.org/gitroot/e4/eclipse.platform.ui.git,path=bundles/$ID" >>new.map else echo $LINE >>new.map fi done