Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- svnurl="svn+ssh://gstark@svn.cern.ch/reps/atlasoff/PhysicsAnalysis/HiggsPhys/Run2/Hbb/CxAODFramework"
- # first clone it all
- for repo in `cat repos`
- do
- git svn clone "${svnurl}/${repo}/trunk" --no-metadata -A CxAOD_authors.txt --stdlayout "${repo}_temp"
- done
- # next set up the bare remotes
- for repo in `cat repos`
- do
- git init --bare "${repo}_bare.git"
- cd "${repo}_bare.git"
- git symbolic-ref HEAD refs/heads/trunk
- cd ../
- done
- # push the temporary clones to bare remotes
- for repo in `cat repos`
- do
- cd "${repo}_temp"
- git remote add bare "../${repo}_bare.git"
- git config remote.bare.push 'refs/remotes/*:refs/heads/*'
- git push bare
- cd ../
- done
- # move trunk to master, update svn tags to git tags
- for repo in `cat repos`
- do
- cd "${repo}_bare.git"
- git branch -m trunk master
- git for-each-ref --format='%(refname)' refs/heads/tags |
- cut -d / -f 4 |
- while read ref
- do
- git tag "$ref" "refs/heads/tags/$ref";
- git branch -D "tags/$ref";
- done
- cd ../
- done
- # remove all temporary clones
- for repo in `cat repos`
- do
- rm -rf "${repo}_temp"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement