From: František Dvořák Date: Tue, 10 Jul 2012 07:43:41 +0000 (+0200) Subject: Updates after longer usage. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=HEAD;p=convert.git Updates after longer usage. --- diff --git a/authors.txt b/authors.txt index dc171a3..94fe182 100644 --- a/authors.txt +++ b/authors.txt @@ -16,7 +16,8 @@ akatsifo=Asterios Katsifodimos akrenek=AleÅ¡ Křenek akrueger= akuseju= -amarasch= +amarasch=Alessandro Maraschini +maraska=Alessandro Maraschini amillar= anechaev= apatil= @@ -25,7 +26,7 @@ aphipps= aretico= asaroka= auzhinsk= -avellino= +avellino=Giuseppe Avellino awilson= badino= baud= @@ -51,7 +52,7 @@ dhsmith= diana= digamber= digirola= -digiusto= +digiusto=Cinzia Di Giusto dimeglio=Alberto Di Meglio dkouril=Daniel Kouřil dpiparo= @@ -215,3 +216,4 @@ dqing=Di Qing sli=Liudmila Stepanova ssayzhen=Sofia Sayzhenkova klopov=Nikolai Klopov +mpoul=Marcel Poul diff --git a/cvs2git-inc.sh b/cvs2git-inc.sh index 2fdde39..92cf385 100755 --- a/cvs2git-inc.sh +++ b/cvs2git-inc.sh @@ -29,51 +29,59 @@ if [ -z "$NO_RSYNC" ]; then ## sync fetched CVS repo to one-module CVS repo #rsync --archive --verbose jra1mw.cvs/ jra1mw-cvssync.cvs/jra1mw/ - ./cvssuck.sh + SKIP_OLD=1 ./cvssuck.sh # import! - [ -d "jra1mw-cvssync.git/.git" ] || (echo "First run! Initial cvs2svn import must be done manually (although 'git cvsimport' will import something too)." && exit 1) + if [ ! -d "jra1mw-cvssync-origin.git/refs" ]; then + echo "First run! Initial cvs2svn import must be done manually (although 'git cvsimport' will import something too)." + exit 1 + fi + + # 1) odlifrovat wms-utils a lb.nagios + # 2) cp -rp CVSROOT .. + ... + unset CVSROOT echo "git cvsimport..." - git cvsimport -d `pwd`/jra1mw-cvssync.cvs -C jra1mw-cvssync.git -a -k -z30 -A authors.txt jra1mw + git cvsimport -d `pwd`/jra1mw-cvssync.cvs -C jra1mw-cvssync-incremental.git -a -k -z30 -A authors.txt jra1mw + + # 3) vrátit wms-utils a lb.nagios + ... fi # firsttime setup for incremental sync if [ ! -d "jra1mw-transfer/.git" ]; then - echo "jra1mw git repo for sync from LCG CVS." > jra1mw-cvssync.git/.git/description + echo "jra1mw git repo for sync from LCG CVS." > jra1mw-cvssync-incremental.git/.git/description git clone /var/lib/git/jra1mw.git jra1mw-transfer cd jra1mw-transfer - git remote add cvssync ../jra1mw-cvssync.git + git remote add cvssync ../jra1mw-cvssync-incremental.git git fetch cvssync - for b in branch_RC31_3 branch_2_0 branch_2_1 branch_workflow branch_3_0; do + for b in branch_RC31_3 branch_2_0 branch_2_1 branch_workflow branch_3_0 branch_3_0_job_summaries michal_Torque master; do echo $b - git checkout -b $b origin/$b || break - #zadat tag do skriptu! - git log -n 1 cvssync/$b + git checkout -b local_${b} origin/$b || break + git tag -a -f -m"$b" lastsync_${b} cvssync/$b done - git checkout master cd - fi cd jra1mw-transfer git fetch cvssync -echo "\ -branch_RC31_3 4316f8ac93d4cfa61b471676c2f81e70f62f1b69 -branch_2_0 385a0a242b5e4666192f1198df92d7d451c79164 -branch_2_1 6ed42184743a87910afc8c720509003301ec6c17 -branch_workflow a0a362418b99167f40d1328ea8a934b147372329 -branch_3_0 a83b40bd71315193486807eee5d89f5c0e052497 -master 7d6f9aa03afaf70dfb6685246940348662eca988" | while read branch start; do - echo "$start..cvssync/$branch" - git checkout $branch || break - cl=`git log --format='%ct %H' $start..cvssync/$branch -- | grep -v '\(e6919c\|1f39df\|1f39df\)' | sort -n | cut -f2 -d' '` +for branch in branch_RC31_3 branch_2_0 branch_2_1 branch_workflow branch_3_0 branch_3_0_job_summaries michal_Torque master; do + echo "lastsync_${branch}..cvssync/$branch" + git checkout local_${branch} || exit 1 + cl=`git log --format='%ct %H' lastsync_${branch}..cvssync/$branch -- | sort -n | cut -f2 -d' '` + echo $cl for c in $cl; do - git cherry-pick $c + git cherry-pick $c || exit 1 done -done -echo "Really push? (CTRL-C for quit)" -read -git push + if test -n "$cl"; then + git tag -a -f -m"$branch" lastsync_${branch} cvssync/$branch + echo "Really push $branch? (CTRL-C for quit)" + read + git push origin local_${branch}:${branch} + echo + fi +done diff --git a/cvs2git.options b/cvs2git.options index 499201f..97cfcfc 100644 --- a/cvs2git.options +++ b/cvs2git.options @@ -257,8 +257,8 @@ ctx.decode_apple_single = False # This option can be set to the name of a filename to which are stored # statistics and conversion decisions about the CVS symbols. -ctx.symbol_info_filename = None -#ctx.symbol_info_filename = 'symbol-info.txt' +#ctx.symbol_info_filename = None +ctx.symbol_info_filename = 'symbol-info.txt' # cvs2svn uses "symbol strategy rules" to help decide how to handle # CVS symbols. The rules in a project's symbol_strategy_rules are @@ -310,7 +310,7 @@ global_symbol_strategy_rules = [ # To force all symbols matching a regular expression to be # excluded from the conversion, add rules like the following: - ExcludeRegexpStrategyRule(r'^(x|y|initial|import)$'), + ExcludeRegexpStrategyRule(r'^(x|y|initial|import|gridsite-core_B_.*|glite-core_B_.*|glite-deployment-lb_B_.*|glite-(lb|jp|security|wms-utils).*_B_.*)$'), # Sometimes people use "cvs import" to get their own source code # into CVS. This practice creates a vendor branch 1.1.1 and @@ -525,6 +525,8 @@ author_transforms={ 'akrueger' : "", 'akuseju' : "", 'amarasch' : "", + 'amarasch' : "Alessandro Maraschini ", 'amillar' : "", 'anechaev' : "", 'apatil' : "", @@ -533,7 +535,7 @@ author_transforms={ 'aretico' : "", 'asaroka' : "", 'auzhinsk' : "", - 'avellino' : "", + 'avellino' : "Giuseppe Avellino ", 'awilson' : "", 'badino' : "", 'baud' : "", @@ -559,7 +561,7 @@ author_transforms={ 'diana' : "", 'digamber' : "", 'digirola' : "", - 'digiusto' : "", + 'digiusto' : "Cinzia Di Giusto ", 'dimeglio' : "Alberto Di Meglio ", 'dkouril' : "Daniel Kouřil ", 'dpiparo' : "", @@ -723,6 +725,7 @@ author_transforms={ 'sli' : "Liudmila Stepanova ", 'ssayzhen' : "Sofia Sayzhenkova ", 'klopov' : "Nikolai Klopov ", + 'mpoul' : "Marcel Poul ", # This one will be used for commits for which CVS doesn't record # the original author, as explained above. @@ -815,5 +818,6 @@ run_options.set_project( # Exclude paths from the conversion. Should be relative to # repository path and use forward slashes: #exclude_paths=['file-to-exclude.txt,v', 'dir/to/exclude'], + exclude_paths=['CVSROOT'], ) diff --git a/cvs2git.sh b/cvs2git.sh index 9c499e8..cca4220 100755 --- a/cvs2git.sh +++ b/cvs2git.sh @@ -1,15 +1,39 @@ #! /bin/bash -svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk - -vim jra1mw.cvs/CVSROOT/config +# poprve: +#svn co --username=guest --password="" http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk +#cp cvs2svn-trunk/cvs2git-example.options cvs2git.options +#vim cvs2git.options +#vim authors.txt + +# cvssuck nebo rsync... +#... +#vim jra1mw-cvssync.cvs/jra1mw/CVSROOT/config #už v sync: rm -fv CVSROOT/*,v CVSROOT/.cvsignore,v -.. cp cvs2svn-trunk/cvs2git-example.options cvs2git.options -... vim cvs2git.options +./cvssuck.sh + +# jeÅ¡tě sloučit moduly +##export CVSROOT=/tmp/root.cvs +##rm -rf /tmp/root.cvs +##mkdir $CVSROOT +##cvs init +##cd jra1mw-cvssync.cvs/jra1mw +##cvs import -I CVSROOT -m"Initial import." jra1mw x y +##mv $CVSROOT/CVSROOT . +##rm -rf /tmp/root.cvs +##unset CVSROOT +##cd .. +##ln -s jra1mw-cvssync.cvs/jra1mw jra1mw.cvs +(cd jra1mw-cvssync.cvs; tar xzf jra1mw-cvsroot.tgz) + +# radsi: +unset CVSROOT + cvs2svn-trunk/cvs2git --options=cvs2git.options -mkdir jra1mw.git -cd jra1mw.git +rm -rf jra1mw-cvssync-origin.git +mkdir jra1mw-cvssync-origin.git +cd jra1mw-cvssync-origin.git git init --shared --bare echo "jra1mw project from LCG CVS." > description cat ../1blob ../2dump | git fast-import @@ -17,6 +41,35 @@ cat ../1blob ../2dump | git fast-import cd - rm -fv 1blob 2dump +# opravy historie jsou potreba pouze, pokud chcem umet cely strom rebazovat (pak je potreba smazat prazdne komity a doplnit prazdne zpravy) +#... viz prikazy za 'exit 0' + +# cleanup +cd jra1mw-cvssync-origin.git +git reflog expire --expire=0 --all +git repack -ad +git prune +git fsck --strict +cd - + +# kopírování +#su +#cd /var/lib/git +#rm -fv jra1mw.git +... +git clone --bare jra1mw-cvssync-origin.git jra1mw.git +cd jra1mw.git +git config core.sharedrepository 1 +echo "jra1mw project from LCG CVS." > description +find . -type d -exec chmod g+sx {} \; +find . -exec chmod g+w {} \; +mv ./hooks/post-update.sample ./hooks/post-update +git remote rm origin +./hooks/post-update +chown -R root:users . + +exit 0 + # ==== repairs and module moves ==== #org.glite.myproxy-config org.glite.px.myproxy-config @@ -30,14 +83,14 @@ rm -fv 1blob 2dump git show ':/^\[no ' >> ../squash-msg.txt # empty commit messages -git log | grep -B4 'empty log message' | grep commit | cut -f2 -d' ' > revs1 +git log --all | grep -B4 'empty log message' | grep commit | cut -f2 -d' ' | grep -v ^$ > revs1 # empty commits -git rev-list HEAD | while read c; do [ -n "$(git diff-tree --root $c)" ] || echo $c; done > revs2 +git rev-list --all | 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 +-f -- --all rm -f revs1 revs2 cd .. diff --git a/cvssuck.sh b/cvssuck.sh index abb6164..89d22f2 100755 --- a/cvssuck.sh +++ b/cvssuck.sh @@ -1,4 +1,27 @@ #! /bin/sh -for module in org.glite.testsuites.ctb/LB org.glite.deployment.jpis org.glite.deployment.jpps org.glite.deployment.lb org.glite.jobid org.glite.jobid.api-c org.glite.jobid.api-cpp org.glite.jobid.api-java org.glite.jp org.glite.jp.client org.glite.jp.common org.glite.jp.doc org.glite.jp.index org.glite.jp.primary org.glite.jp.server-common org.glite.jp.ws-interface org.glite.lb org.glite.lb.client org.glite.lb.client-interface org.glite.lb.client-java org.glite.lb.common org.glite.lb.doc org.glite.lb.glite-LB org.glite.lb.harvester org.glite.lbjp-common org.glite.lbjp-common.db org.glite.lbjp-common.gsoap-plugin org.glite.lbjp-common.gss org.glite.lbjp-common.jp-interface org.glite.lbjp-common.log org.glite.lbjp-common.maildir org.glite.lbjp-common.server-bones org.glite.lbjp-common.trio 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.logger org.glite.lb.logger-msg org.glite.lb.proxy org.glite.lb.server org.glite.lb.server-bones org.glite.lb.state-machine org.glite.lb.types org.glite.lb.utils 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 org.glite.lb.ws-interface org.glite.lb.ws-test org.glite.lb.yaim org.glite.lb.emi-lb org.glite.myproxy-config org.glite.px org.glite.px.glite-PX org.glite.px.myproxy-config org.glite.px.myproxy-yaim org.glite.px.proxyrenewal org.glite.px.emi-px org.glite.security.gsoap-plugin org.glite.security.gss org.glite.security.proxyrenewal org.glite.testsuite.ctb org.glite.yaim.lb org.glite.yaim.myproxy org.gridsite.core; do +#org.glite.px.myproxy-config +OLD="org.glite.deployment.jpis org.glite.deployment.jpps org.glite.deployment.lb org.glite.jp org.glite.jp.client org.glite.jp.common org.glite.jp.doc org.glite.jp.index org.glite.jp.primary org.glite.jp.server-common org.glite.jp.ws-interface org.glite.lbjp-utils.jobid org.glite.lbjp-utils.maildir org.glite.lbjp-utils.server-bones org.glite.lbjp-utils.trio org.glite.lbjp-utils.db org.glite.lb.proxy org.glite.lb.server-bones org.glite.lb.utils 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 org.glite.security.gsoap-plugin org.glite.security.gss org.glite.security.proxyrenewal org.glite.yaim.lb org.glite.yaim.myproxy org.glite.wms-utils.jobid org.glite.wms-utils.exception" +test -z "$SKIP_OLD" || OLD="" + +for module in $OLD org.glite.testsuites.ctb/CANL-C org.glite.testsuites.ctb/LB org.glite.testsuites.ctb/PX org.glite.testsuites.ctb/gridsite org.glite.jobid org.glite.jobid.api-c org.glite.jobid.api-cpp org.glite.jobid.api-java org.glite.lb org.glite.lb.client org.glite.lb.client-interface org.glite.lb.client-java org.glite.lb.common org.glite.lb.doc org.glite.lb.glite-LB org.glite.lb.harvester org.glite.lbjp-common org.glite.lbjp-common.db org.glite.lbjp-common.gsoap-plugin org.glite.lbjp-common.gss org.glite.lbjp-common.jp-interface org.glite.lbjp-common.log org.glite.lbjp-common.maildir org.glite.lbjp-common.server-bones org.glite.lbjp-common.trio org.glite.lb.logger org.glite.lb.logger-msg org.glite.lb.server org.glite.lb.state-machine org.glite.lb.types org.glite.lb.ws-interface org.glite.lb.ws-test org.glite.lb.yaim org.glite.lb.emi-lb org.glite.lb.nagios org.glite.myproxy-config org.glite.px org.glite.px.glite-PX org.glite.px.myproxy-yaim org.glite.px.proxyrenewal org.glite.px.emi-px org.gridsite.core emi.canl.canl-c; do + echo $module cvssuck/cvssuck :pserver:anonymous@jra1mw.cvs.cern.ch:/cvs/jra1mw -o jra1mw-cvssync.cvs/jra1mw/$module $module + sleep 0.5 done +rm -rf jra1mw-cvssync.cvs/jra1mw/org.glite.px.myproxy-config/org.glite.security.voms-api/.git +rm -rf jra1mw-cvssync.cvs/jra1mw/org.glite.px.myproxy-config/org.glite.security.voms-api-cpp/.git + +exit $? + +# ===== + +# získání fake CVSROOT +mkdir /tmp/mycvsroot +export CVSROOT=/tmp/mycvsroot +cvs init +mkdir /tmp/mycvsmodules +cd /tmp/mycvsmodule +for i in `ls -1 %D`; do mkdir $i; done +cvs import jra1mw x y +#mv /tmp/mycvsroot/CVSROOT .../jra1mw/ +...