Created
January 4, 2014 03:35
-
-
Save ik0r/8251291 to your computer and use it in GitHub Desktop.
放在svn目录中,执行 ./svn2git.sh > author.txt 或者 ./svn2git2.sh > author.txt 得到所有提交者的信息,然后修改author.txt中等号后面的信息 在使用git-svn迁移项目时,使用 --authors-file=author.txt导入提交者信息
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq) | |
| for author in ${authors}; do | |
| echo "${author} = ${author} email@example.com"; | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| svn log --xml | grep -P "^<author" | sort -u | perl -pe 's/<author>(.*?)<\/author>/$1 = $1 email@example.com/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment