All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russ Brown <pickscrape@gmail.com>
To: git@vger.kernel.org
Subject: Re: git-svn and a nested branches folder
Date: Tue, 04 Sep 2007 13:03:19 -0500	[thread overview]
Message-ID: <46DD9DE7.1060004@gmail.com> (raw)
In-Reply-To: <20070904174006.GB4538@xp.machine.xx>

Peter Baumann wrote:
> On Tue, Sep 04, 2007 at 10:21:22AM -0500, Russ Brown wrote:
>> David Kastrup wrote:
>>> Russ Brown <pickscrape@gmail.com> writes:
>>>
>>>> David Kastrup wrote:
>>>>> Russ Brown <pickscrape@gmail.com> writes:
>>>>>
>>>>>> I'm having some trouble with using git-svn to fetch a repository, and I
>>>>>> think it's because the repository doesn't store branches as a flat list
>>>>>> directly under the 'branches' directory.
>>>>>>
>>>>>> Basically, we have a structure like this:
>>>>>>
>>>>>> |
>>>>>> +-trunk
>>>>>> +-tags
>>>>>> +-branches
>>>>>>   + category-a
>>>>>>     + branch-a
>>>>>>     + branch-b
>>>>>>   + category-b
>>>>>>     + branch-c
>>>>>>     + branch-d
>>>>>>
>>>>>> etc. category-a and category-b are simple directories created using svn
>>>>>> mkdir. The branches are created using svn cp.
>>>>>>
>>>>>> It helps us to organise the branches better, but the rationale is
>>>>>> besides the point. The problem is that git-svn seems to want to
>>>>>> treat category-a and category-b as branches, which isn't right at
>>>>>> all. As a result, git-svn seems to skip most (if not all) revisions
>>>>>> that occur in these directories and creates a lot of entries in
>>>>>> unhandled.log.
>>>>> So what did you specify in your .git/config file regarding the svn
>>>>> structure?
>>>> I specified the 'branches' directory, but that's because earlier in
>>>> the life of the repo we did just do the flat branch layout, but
>>>> decided to make it more structured once that got unwieldy.
>>> Cough, cough.  _What_ did you specify in your .git/config file
>>> regarding the svn structure?  Please quote the section.
>>>
>> Erm, sorry.
>>
>> [svn-remote "svn"]
>>         url = svn://svn.<name>.com
>>         fetch = trunk:refs/remotes/trunk
>>         branches = branches/*:refs/remotes/*
>>         tags = tags/*:refs/remotes/tags/*
>>
>> (URL changed in case it annoys my employers)
>>
>> I didn't write this by hand: it was generated by git-svn init.
>>
> 
> Try something like this:
> 
> [svn-remote "svn"]
> 	# trunk
> 	fetch = trunk:refs/remotes/trunk
> 
> 	# branches
> 	fetch = branches/category-a/branch_a:refs/remotes/svn/branch_a
> 	fetch = branches/category-a/branch_b:refs/remotes/svn/branch_b
> 	fetch = branches/category-b/branch_c:refs/remotes/svn/branch_c
> 
> 	# tags
> 	tags = tags/*:refs/remotes/tags/*
> 
> 
> (Not sure if wildcards will work here, but I'm sure you could experiment and try
>  it out :-)
> 

Thanks a lot! I'll try it out.

I wonder if I'm going to have to fetch in stages here. i.e. configuring
the branches for the original layout, fetching up the point where the
layout changed a bit and reconfigure, fetch some more, tweak again etc.

> -Peter


-- 

Russ

  reply	other threads:[~2007-09-04 18:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 14:42 git-svn and a nested branches folder Russ Brown
2007-09-04 14:46 ` David Kastrup
2007-09-04 14:54   ` Russ Brown
2007-09-04 15:01     ` David Kastrup
2007-09-04 15:21       ` Russ Brown
2007-09-04 17:40         ` Peter Baumann
2007-09-04 18:03           ` Russ Brown [this message]
2007-09-05  0:15 ` Eric Wong
2007-09-05  9:56   ` Russ Brown
2007-09-05 10:09     ` Eric Wong
2007-09-05 10:15       ` Russ Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46DD9DE7.1060004@gmail.com \
    --to=pickscrape@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.