blob: a45a05aee1de5984278f9e91bc42ad003f2e0801 [file] [log] [blame]
# 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
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 pass directory for later.
# now examine the repo, hopefully the tags and branches that we care about are in decent shape.
# In my case, I see Cherrypick markers for a couple of tags. When the conversion is complete and most
# people are happy, a developer will have to examine these commits to see if they
# can be simplified.
Cherrypick tag: R3_0 commit: ec4e21626f848f63af2a079c5f5e161efc8630fa
Cherrypick tag: R3_0_2 commit: ab6a3dacc5785470eaad1a091359123c78b7ea83
Cherrypick tag: R3_1 commit: 805e3ddc8ae21b1c012bd6cffd0f4473e831e695
Cherrypick tag: R3_4_1 commit: 6df1509a2002dea97b89c12b67ac2a24dbe0f726
Cherrypick tag: R3_5 commit: 5d4327c6204d8892eea7dae079391d93bd44c82c
# copy it as pwebster to my home dir
mkdir eclipse.platform.ui
cp -r /shared/eclipse/e4/git/cvs/eclipse.platform.ui/.git eclipse.platform.ui
# try and create the bare repo mirror on dev.eclipse.org
git clone -l --mirror $HOME/eclipse.platform.ui /gitroot/platform/eclipse.platform.ui.git
# this did not create the permissions that I wanted.
# now it should be a public test repo:
ssh://pwebster@dev.eclipse.org/gitroot/platform/eclipse.platform.ui.git
#
#
# 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
# 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 <ui.map
# converting a simple map file with sed
sed 's/^\([^@]*\)@\([^=]*\)=\([^,]*\),.*$/\1@\2=GIT,tag=\3,repo=git:\/\/git.eclipse.org\/gitroot\/e4\/eclipse.platform.ui.git,path=bundles\/\2/g'
# for tests, we use file:///gitroot
# provides default path in bundles, needs to be modified afterwards for tests and examples