[jboss-dev] Porting SVN Projects to Git

Carlo de Wolf cdewolf at redhat.com
Thu Jul 15 07:50:54 EDT 2010


For some reason it creates svn.branches and svn.tags with double 
slashes, which triggers the assertion.

$ more .git/config
[core]
     repositoryformatversion = 0
     filemode = true
     bare = false
     logallrefupdates = true
[svn-remote "svn"]
     url = https://svn.jboss.org/repos/jbossas
     fetch = projects/jboss-reflect/trunk:refs/remotes/trunk
     branches = projects/jboss-reflect/branches//*:refs/remotes/*
     tags = projects/jboss-reflect/tags//*:refs/remotes/tags/*
[svn]
     authorsfile = /home/carlo/.git_svn_authors_mapping

Remove the double slashes and you are in business again.

Carlo

On 07/15/2010 12:46 PM, Kabir Khan wrote:
> Has anyone encountered this problem?
>
> [kabir ~/sourcecontrol/temp/git/jboss-reflect]
> $git svn init --trunk=https://svn.jboss.org/repos/jbossas/projects/jboss-reflect/trunk --tags=https://svn.jboss.org/repos/jbossas/projects/jboss-reflect/tags --branches=https://svn.jboss.org/repos/jbossas/projects/jboss-reflect/branches https://svn.jboss.org/repos/jbossas/projects/jboss-reflect
> Initialized empty Git repository in /Users/kabir/sourcecontrol/temp/git/jboss-reflect/.git/
> Using higher level of URL: https://svn.jboss.org/repos/jbossas/projects/jboss-reflect/trunk =>  https://svn.jboss.org/repos/jbossas
>
> [kabir ~/sourcecontrol/temp/git/jboss-reflect]
> $git config svn.authorsfile ~/.git_svn_authors_mapping
>
> [kabir ~/sourcecontrol/temp/git/jboss-reflect]
> $git svn fetch
> W: Ignoring error from SVN, path probably does not exist: (175002): RA layer request failed: REPORT of '/repos/jbossas/!svn/bc/100': Could not read chunk size: Secure connection truncated (https://svn.jboss.org)
> W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
> This may take a while on large repositories
> Assertion failed: (svn_path_is_canonical(component, pool)), function svn_path_join, file subversion/libsvn_subr/path.c, line 115.
> error: git-svn died of signal 6
>
> [kabir ~/sourcecontrol/temp/git/jboss-reflect]
> $git svn fetch
> Assertion failed: (svn_path_is_canonical(component, pool)), function svn_path_join, file subversion/libsvn_subr/path.c, line 115.
> error: git-svn died of signal 6
>
>
> On 15 Jul 2010, at 00:23, Emmanuel Bernard wrote:
>
>    
>> Here is my version of it
>> http://blog.emmanuelbernard.com/2010/05/git-how-my-life-has-improved-since-last-month-when-i-used-svn/
>>
>> Note that I do not use any special script
>>
>> On 14 juil. 2010, at 19:34, Galder Zamarreño<galder at jboss.org>  wrote:
>>
>>      
>>> U should blog/twiiter about this :)
>>>
>>> On Jul 14, 2010, at 6:40 PM, 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
>>>>          
>>> --
>>> Galder Zamarreño
>>> Sr. Software Engineer
>>> Infinispan, JBoss Cache
>>>
>>>
>>> _______________________________________________
>>> jboss-development mailing list
>>> jboss-development at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>>        
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>      
>
> _______________________________________________
> 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