blob: 6af4a8eddca3ac5fe1d9322559f8450eda8f4bdb [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
mkdir cvsroot.eclipse.platform.ui
cd cvsroot.eclipse.platform.ui
cvs -d :local:$(pwd) init
# make a userful subdir to use
mkdir -p eclipse.platform.ui
cd eclipse.platform.ui
mkdir bundles examples features tests
# copy over from modules
. modules_ui.sh
cd /cvsroot/eclipse
for M in $MODULES; do
cp -r $M /shared/eclipse/e4/git/cvs/cvsroot.eclipse.platform.ui/eclipse.platform.ui/bundles
done
# move them into tests or examples, as they're all in bundles.
# clean the CVS repo of links
find cvsroot.eclipse.platform.ui -type l|xargs -n 1 rm
# 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
# run the cvs2git tool
cvs2svn-trunk/cvs2git --options=org.eclipse.migration/eclipse.platform.ui/pass2/cvs2git.options
# create a git repo
git init --shared eclipse.platform.ui #tmp repo
# try the fast import
cd eclipse.platform.ui
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.sh
grep ^git ../tag_report.sh >../mv_tags.sh
# examine them
/bin/bash ../mv_tags.sh
# 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