[jboss-dev] Porting SVN Projects to Git
Andersen Max
max.andersen at redhat.com
Wed Aug 4 04:24:01 EDT 2010
for those who got admin logins for jira this script is rather helpfull ;)
uname.sh:
USERNAME=$1
PWD=$2
ORGUSER=$3
ORGNAME=`curl -u $USERNAME:$PWD https://jira.jboss.org/secure/ViewProfile.jspa?name=$ORGUSER | sed -n -e 's/.*up-d-fullname.*\>\(.*\)\<\/dd.*/\1/p'`
ORGEMAIL=`curl -u $USERNAME:$PWD https://jira.jboss.org/secure/ViewProfile.jspa?name=$ORGUSER | sed -n -e 's/.*up-d-email.*mailto:\(.*\)".*\/dd.*/\1/p'`
echo $ORGNAME \($ORGUSER\) \<$ORGEMAIL\>
then uname.sh <jirauser> <jirapwd> maxcsaucdk
gives you:
Max Andersen (maxcsaucdk) <max at hibernate.org>
The wonders of http accessible "API"'s ;)
/max
On Jul 14, 2010, at 18:40, Andrew Lee Rubinger wrote:
> Today I look a relatively simple project and migrated it from SVN to
> Git. There's a bunch of resources scattered about involving the "best"
> way to do this, but thought I'd share my experience as it appears to
> have been a success. If anyone's got a better process I'm interested, too.
>
> Note: I'm on Fedora13, so some commands here are gonna be env-specific.
>
> # Obtain dependencies which run or are run from the svn2git Ruby script
> $> sudo yum -y install git-core git-svn ruby rubygems
> (Original instructions used apt-get, so I assume Debianey/Ubuntooey
> distros support this command too)
>
> # Install the svn2git gem (script)
> $> sudo gem install svn2git --source http://gemcutter.org
>
> # Make a new directory to contain your new local Git repo and switch into it
> $> mkdir jboss-ejb3-async; cd jboss-ejb3-async
>
> # (Optional) Create a mapping file from SVN usernames to Git Authors
> $> svn log | grep -E "r[0-9]+ \| [a-z]+ \|" | awk '{print $3}' | sort |
> uniq # Prints out all authors for the current SVN working copy
> File format should be:
> SVNUsername = Full Name <email.address.org>
> ALRubinger = Andrew Lee Rubinger <alr at jboss.org>
>
> # Use svn2git to extract out the SVN commit information, passing along
> parameters to note trunk, tags, branches locations
> $> svn2git https://svn.jboss.org/repos/jbossas/ --trunk
> projects/ejb3/components/async/trunk --tags
> projects/ejb3/components/async/tags --nobranches --authors ../authors.txt
> (More info on the switches at: http://github.com/nirvdrum/svn2git)
>
> # Create a remote repo somewhere (I did GitHub and used the web console
> for that)
>
> # Add a remote "origin" to the local repo so we can push to it
> $> git remote add origin git at github.com:ALRubinger/jboss-ejb3-async.git
>
> # Push all contents including the tags to the origin at branch master
> $> git push --tags origin master
>
> S,
> ALR
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
More information about the jboss-development
mailing list