Before running, create an authors-file.txt
in the same directory as the
script:
svn log -q ${SVNURL} \
| awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' \
| sort -u > authors-file.txt
To get something like:
ball = ball <ball>
And then replace with actual e'mail addresses:
sed -i '' 's/<ball>/Allen D. Ball <ball@hcf.dev>/g' authors-file.txt
ball = ball Allen D. Ball <ball@hcf.dev>
Make sure git
and gh
are configured. To run:
bash SVN-to-GitHub.bash [SVNURL | local copy]
Argument can either be an SVN repository URL or a working directory. The
script attempts to detect if the repository is in the "standard layout." To
aid the detection process when specifying a URL, append /trunk
if the
repository is in the standard layout.
For repositories in "standard layout," branches are ultimately ignored but
tags are preserved as git
branches. An orphaned gh-pages
branch is also
created.