From: František Dvořák Date: Sun, 3 Apr 2011 16:37:40 +0000 (+0200) Subject: Better steps for cvs2svn offline import. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=639a6c89e4c3a6ef42d740d3e7ed9394111288bf;p=convert.git Better steps for cvs2svn offline import. --- diff --git a/cvs2git.sh b/cvs2git.sh index 1aa357c..b4225cd 100755 --- a/cvs2git.sh +++ b/cvs2git.sh @@ -11,6 +11,7 @@ cvs2svn-trunk/cvs2git --options=cvs2git.options mkdir jra1mw.git cd jra1mw.git git init --shared --bare +echo "jra1mw project from LCG CVS." > description cat ../1blob ../2dump | git fast-import ../cvs2svn-trunk/contrib/git-move-refs.py cd - @@ -25,21 +26,30 @@ rm -fv 1blob 2dump #org.glite.security.proxyrenewal org.glite.px.proxyrenewal #org.glite.yaim.myproxy org.glite.px.myproxy-yaim -# prazdne zpravy +#remember the message from the one empty commit: +git show ':/^\[no ' >> ../squash-msg.txt + +# empty commit messages git log | grep -B4 'empty log message' | grep commit | cut -f2 -d' ' > revs1 -# prazdne commity +# empty commits git rev-list HEAD | while read c; do [ -n "$(git diff-tree --root $c)" ] || echo $c; done > revs2 + git filter-branch \ --msg-filter 'if grep -q "$GIT_COMMIT" '"$(pwd)/"revs1'; then echo "cvs2git: empty log message"; else cat; fi' \ --commit-filter 'if grep -q "$GIT_COMMIT" '"$(pwd)/"revs2'; then skip_commit "$@"; else git commit-tree "$@"; fi' \ -f HEAD +rm -f revs1 revs2 + +cd .. +git clone jra1mw.git +cd jra1mw # edit commit message and squash # udělat až při hlavnim rebase -...#git rebase -i `git show '--format=%H' ':/^\[no change - only corrected log message\]' | head -n 1`^ +#git rebase -i `git show '--format=%H' ':/^\[no change - only corrected log message\]' | head -n 1`^ # restructuring -#za restructuring prohlažme 2007-11-07 16:12:07 +#let's declare restructuring at 2007-11-07 16:12:07 rm -rf org.glite.lb.server-bones org.glite.lb.proxy org.glite.lb.client-interface org.glite.lbjp-utils.db org.glite.lbjp-utils.jobid org.glite.lbjp-utils.maildir org.glite.lbjp-utils.server-bones org.glite.lbjp-utils.trio org.glite.lb-utils org.glite.lb-utils.context org.glite.lb-utils.db org.glite.lb-utils.jobid org.glite.lb-utils.server-bones org.glite.lb-utils.trio git commit -a -m"cvs2git: L&B restructuring" @@ -47,7 +57,7 @@ git commit -a -m"cvs2git: L&B restructuring" rm -rf org.glite.deployment.jpis org.glite.deployment.jpps org.glite.deployment.lb git commit -a -m"cvs2git: deployment modules changed to yaim" -# yaim L&B +# L&B yaim -> L&B rm -rf org.glite.yaim.lb git commit -a -m"cvs2git: moving yaim.lb to L&B subsystem" @@ -60,24 +70,40 @@ git commit -a -m"cvs2git: moving MyProxy yaim to PX subsystem" rm -rf org.glite.security.proxyrenewal git commit -a -m"cvs2git: moving proxyrenewal to PX subsystem" +rm -rf org.glite.px.myproxy-config +git commit -a -m"cvs2git: MyProxy startup script no longer needed" + rm -rf org.glite.security.gss org.glite.security.gsoap-plugin git commit -a -m'cvs2git: merging security modules moved to lbjp-common subsystem' +# reword 'register job to JP when it became known for JP' +# register job to JP when it became known for LB (even grey job) and not any +# more +# - avoid double registrations # 'deployment modules changed to yaim' před 'First import' # 'L&B restructuring' za (!) 'Serverbones moved' # 'moving yaim.lb to L&B subsystem' před 'Moving org.glite.yaim.lb to L&B subsystem.' # 'moving MyProxy startup script to PX subsystem' před 'Move org.glite.myproxy-config to px subsystem.' # 'moving MyProxy yaim to PX subsystem' před 'YAIM Module for MyProxy moved here from org.glite.yaim' # 'moving proxyrenewal to PX subsystem' před 'Moving files to proper locations' -# 'merging security modules moved to lbjp-common subsystem' za (byl merge) 'Modified to reflect version 2.1.5-1' -git rebase -i `git show '--format=%H' ':/First import' org.glite.yaim.lb | head -n 1`^ +# 'MyProxy startup script no longer needed' před 'glite-PX deployment.' (org.glite.lb) +# 'merging security modules moved to lbjp-common subsystem' za (byl merge) 'Modified to reflect version 2.1.5-1' (org.glite.lbjp-common.gss, Dec 15 2010, ten novější) +git rebase -i `git show '--format=%H' ':/First import' -- org.glite.yaim.lb | head -n 1`^ +#git commit +#git rebase --continue +... + +# go up! +vim ../jra1mw.git/config # disable denyNonFastforwards +git push -f +vim ../jra1mw.git/config # enable denyNonFastforwards + +cd .. -# pročiÅ¡tění (will make 'git fsck' happy) -#asi neni potřeba: -git reflog expire --dry-run --expire=0 --all +# cleanup (will make 'git fsck' happy) +cd jra1mw.git +git reflog expire --expire=0 --all git repack -ad git prune -# go up! -#git push -f - +git fsck --strict