Re: hot to fix git svn import or just discard 'branches' folder
Thanks Brian,
On Feb 4, 2009, at 10:39 AM, Brian Gernhardt wrote:
Show 15 quoted lines
>
> On Feb 4, 2009, at 12:03 PM, Marius Seritan wrote:
>
>> I imported over night an svn repository with the command:
>>
>> git svn clone --prefix svn/ -r 860 http://svn.some.com/svn/someproject
>>
>> The svn repository uses the usual trunk, branches, tag so I
>> (wrongly?) assumed I do not need to pass any command switches
>> regarding the structure of the repo.
>
> "git svn clone URL" attempts to act like "svn co URL", but with
> history. If you only want to download the trunk, then you should
> add "/trunk" to the end of the URL. If you want to capture all the
> branches, tags, etc you should use "--stdlayout" (also spelled "-s").
I want to capture the current trunk and any new branches. It seems the -s is required if I do a reimport.
Show 9 quoted lines
>
>
>> I obviously did something wrong because now I have a git repository
>> with just one remote branch and it contains the folders trunk,
>> branches and tag. I do not want to reimport because it is taking
>> lots of time and bandwidth.
>
> I believe fixing this without reimporting requires using "git filter-
> branch". I'm unfamiliar with it, so I can't help you with that part.
Thanks, I will look into it. From the first read this seems to be pretty advanced.
Show 5 quoted lines
>
>
> However, I'm curious as to why this took a lot of time because the "-
> r 860" on the command line should tell git-svn to only download a
> single revision. Is it a particularly repository?
All of the repository was imported including branches in spite of the - r. This is private repository for a company's web site, it has your usual assortment of jars and the history has a dozen branches and a couple of tags. The size on the disk is about 3GB, I was a bit surprised by it.
Marius
>
>
> ~~ Brian