git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk>
To: git@vger.kernel.org
Subject: Re: Efficient cloning from svn (with multiple branches/tags   subdirs)
Date: Wed, 14 Oct 2009 10:07:27 +0100	[thread overview]
Message-ID: <4AD594CF.5000304@manchester.ac.uk> (raw)
In-Reply-To: <20091014060307.GA17178@dcvr.yhbt.net>

Hi Eric,

Eric Wong wrote:
> Hi Bruno,
> 
> That looks like there's two levels of tags.  You should be able to do
> this with your version of git in $GIT_CONFIG:
> 
> 	[svn-remote "svn"]
> 		url = http://restlet.tigris.org/svn/restlet
> 		fetch = trunk:refs/remotes/svn/trunk
> 		branches = branches/*:refs/remotes/svn/*
> 		tags = tags/*/*:refs/remotes/svn/tags/*/*
> 		; note the */* to glob at multiple levels

Thank you, here is what I had (with the multiple -t/-b):

[svn-remote "svn"]
         url = http://restlet.tigris.org/svn/restlet
         branches = branches/1.0/*:refs/remotes/svn/*
         branches = branches/1.1/*:refs/remotes/svn/*
         tags = tags/1.0/*:refs/remotes/svn/tags/*
         tags = tags/1.1/*:refs/remotes/svn/tags/*
         tags = tags/1.2/*:refs/remotes/svn/tags/*
         tags = tags/2.0/*:refs/remotes/svn/tags/*

I think the notation you suggest "*/*" is indeed better, since I don't 
have to specify each tag sub-directory. However, they change so rarely 
that it was only a minor issue.


>> What surprises me is that it looks like it's looping over and over,  
>> since sometimes it starts back from SVN revision 1 when it's trying to  
>> import a new tag.
> 
> Yeah, that's an unfortunate thing about the flexibility of Subversion,
> basically anything can be a "tag" or a directory and it's extremely
> hard for git svn to support any uncommon cases for tags/branches
> out-of-the box, so the manual config editing is needed.

I must admit I don't fully understand how git-svn does the import, but 
even with this manual configuration, it still tries to pull (almost) 
every revision from revision 1 for each tag, a bit as if there was:
   for each tag:
      for revision in 1 to tag.latest revision:
         pull the revision

(This isn't even for each tag, but for each modification of each tag, 
since tags aren't really tags in SVN).

What I'd like to be able to do (mainly for efficiency and more 
importantly not to hammer tigris.org) is to pull each revision at most 
once (even if it's for the directory at the top of trunk, branches and 
tags).

Best wishes,

Bruno.

  reply	other threads:[~2009-10-14  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13 18:13 Efficient cloning from svn (with multiple branches/tags subdirs) Bruno Harbulot
2009-10-14  6:03 ` Eric Wong
2009-10-14  9:07   ` Bruno Harbulot [this message]
2009-10-14 16:28   ` Avery Pennarun
2009-10-14 18:00     ` Eric Wong
2009-10-14 18:26       ` Avery Pennarun
2009-10-15 17:23         ` Bruno Harbulot
2009-10-15 17:29           ` B Smith-Mannschott
2009-10-16 11:20             ` Bruno Harbulot

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=4AD594CF.5000304@manchester.ac.uk \
    --to=bruno.harbulot@manchester.ac.uk \
    --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 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 NNTP newsgroup(s).