On 31 Dec 2015, at 08:59, Gareth Huang <academi...@gmail.com> wrote:
GuysNow I have a SVN project and I wanna switch it into gerrit now. Do we have a guide for this?
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
svn log | awk -F
'|'
'/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2"@ingrooves.com>"}'
| sort -u > authors-transform.txt
git svn clone --no-minimize-url -A ../authors-transform.txt \
-r 88160:HEAD http://svn.INgrooves.com/svn/INgrooves/Apollo/UI \
--prefix=origin/ --trunk=trunk --branches=branches \
rm -rf ./${IMPORTED_GIT_REPO_NAME}
git init --bare ${IMPORTED_GIT_REPO_NAME}
cd ${GIT_SVN_REPO_NAME}
git remote remove local-git
git remote add local-git ../${IMPORTED_GIT_REPO_NAME}
git config remote.local-git.push 'refs/remotes/origin/*:refs/heads/*'
git push local-git master
git push local-git remotes/origin/2.0
4. We use BFG to prune away deleted binary files from the repository's history. Note that this will change your repo history. This is OK for us because history is for people, not builds, and we keep our old svn repository. The size reductions are dramatic.
java -jar ../bfg/bfg.jar --strip-blobs-bigger-than 50M ${IMPORTED_GIT_REPO_NAME}
java -jar ../bfg/bfg.jar --delete-files '*.{aif,aiff,dll,epub,exe,jar,obj,mobi,mov,mpeg,mp3,mp4,nupkg,pdb,wav,wixpdb,wma,zip}' ${IMPORTED_GIT_REPO_NAME}
cd ${IMPORTED_GIT_REPO_NAME}
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git repack -a -d -f --depth=250 --window=250
5. Upload the bare repository directly to the gerrit data directory. Restart the gerrit server or flush its caches.