git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Russ Brown <pickscrape@gmail.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org
Subject: Re: git-svn and a nested branches folder
Date: Wed, 05 Sep 2007 05:15:17 -0500	[thread overview]
Message-ID: <46DE81B5.7090500@gmail.com> (raw)
In-Reply-To: <20070905100919.GA11074@soma>

Eric Wong wrote:
> Russ Brown <pickscrape@gmail.com> wrote:
>> Eric Wong wrote:
>>> Russ Brown <pickscrape@gmail.com> wrote:
>>>> Basically, we have a structure like this:
>>>>
>>>> |
>>>> +-trunk
>>>> +-tags
>>>> +-branches
>>>>   + category-a
>>>>     + branch-a
>>>>     + branch-b
>>>>   + category-b
>>>>     + branch-c
>>>>     + branch-d
> 
>>>> The only other problem is in branch naming, which could clash if you
>>>> only use the outer-most directory name, so I'd suggest something that
>>>> involves concatenating the folders in the path relative to 'branches' to
>>>> keep them unique (if git can handle slashes in branch names then all the
>>>> better).
>>> As Peter suggested, disable globbing for branches and use explicit
>>> fetch refspecs for now...
>>>
>> I've actually knocked up a rough script which generates a list of
>> refspec lines for you given a repo URL, trunk reference and branches
>> directory. It uses svn log -v --xml and pipes it through a couple of
>> XSLT templates, and basically looks for all copies that copy from trunk
>> (recursively: so it includes branches of branches too). I can post it to
>> the list if you'd find it useful or interesting.
>>
>> It's generating output that looks sensible to me, but the results aren't
>> quite what I'd expected. I'll paste a sample in here in case there's
>> anything obvious someone might spot that I've missed
>>
>> # This line was generated by git-svn init, and I kept it
>> fetch = all/trunk:refs/remotes/trunk
>>
>> # These lines generated by my tool, dirnames replaced for security reasons:
>>
>> fetch = branches/folder/projecta:refs/remotes/svn/folder/projecta
>> fetch = branches/folder/projectb:refs/remotes/svn/folder/projectb
>> fetch = branches/folder/projectc:refs/remotes/svn/folder/projectc
>> fetch = branches/folder/projectd:refs/remotes/svn/folder/projectd
>> fetch = branches/folder/projecte:refs/remotes/svn/folder/projecte
>> fetch = branches/folder/projectf:refs/remotes/svn/folder/projectf
>> fetch = branches/folder/projectg:refs/remotes/svn/folder/projectg
>>
>> git branch -a doesn't list any of those branches after fetch completes.
>> Looking back at the output from fetch, all revisions applied were to trunk.
>>
>> Anything wrong with those fetch lines?
> 
> From your tree diagram, it seemed that trunk/ and branches/ were at
> the same depth in your SVN repository.  However, in your generated
> fetch lines they all started with "branches/" in front, yet your
> trunk fetch line had "all/" in front of trunk, so maybe prefixing
> the generated ones with "all/" helps?
> 

Ah! I think I know what I've done. I generated the fetch list from the
svn repository itself, but ran svn-init against an svk mirror (using
--use-svm-props). Nicely spotted. :)

Thanks again!

>> Thanks for your time.
> 
> No problem.
> 


-- 

Russ

      reply	other threads:[~2007-09-05 10:15 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
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 [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=46DE81B5.7090500@gmail.com \
    --to=pickscrape@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).