Hello,
I am working on migrating some projects from SVN to Stash using git-svn.
I can successfully copy my content from svn to git using the following instructions:
https://go-dvcs.atlassian.com/display/aod/initial+clone
https://go-dvcs.atlassian.com/display/aod/Sync
However, when I push from git to Stash using these instructions:
https://confluence.atlassian.com/display/STASH/Importing+code+from+an+existing+project
the branches/tags do not appear. It looks like either only local branches/tags get pushed to Stash or only local branches/tags appear in Stash (not sure which...).
The git documentation here:
http://git-scm.com/book/ch8-2.html
explains how to convert remote tags/branches to local during a migration to git and doing this makes the new local branches/tags appear in Stash, however doing this breaks the sync.
My current process looks like this:
git svn clone --trunk=/trunk --branches=/branches --tags=/tags --ignore-paths="xxx|yyyy" --revision 63615:HEAD --authors-file=/opt/account/authors.txt file:///opt/account/SVNData/repository_backups/CODE/CODE3 code3.git
git remote add stash http://user@stash-dev/scm/code/code3.git
git for-each-ref refs/remotes/tags | cut -d / -f 4- | grep -v @ | while read tagname; do git tag "$tagname" "tags/$tagname"; git branch -r -d "tags/$tagname"; done
git for-each-ref refs/remotes | cut -d / -f 3- | grep -v @ | while read branchname; do git branch "$branchname" "refs/remotes/$branchname"; git branch -r -d "$branchname"; done
git push --all stash
git push --tags stash
Sync:
cd code3.git
git svn fetch
java -jar /opt/account/svn-migration-scripts.jar sync-rebase
This seems like something that others would have encountered. Any thoughts on what I am doing wrong?