From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russ Brown Subject: Re: git-svn and a nested branches folder Date: Tue, 04 Sep 2007 10:21:22 -0500 Message-ID: <46DD77F2.3040000@gmail.com> References: <46DD6EEA.9010304@gmail.com> <86veaqebf1.fsf@lola.quinscape.zz> <46DD718C.7060908@gmail.com> <86r6leeaq7.fsf@lola.quinscape.zz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Sep 04 17:21:44 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1ISaDl-0001hh-NL for gcvg-git@gmane.org; Tue, 04 Sep 2007 17:21:42 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754185AbXIDPVg (ORCPT ); Tue, 4 Sep 2007 11:21:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754183AbXIDPVg (ORCPT ); Tue, 4 Sep 2007 11:21:36 -0400 Received: from wx-out-0506.google.com ([66.249.82.235]:33355 "EHLO wx-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754167AbXIDPVf (ORCPT ); Tue, 4 Sep 2007 11:21:35 -0400 Received: by wx-out-0506.google.com with SMTP id h31so1828727wxd for ; Tue, 04 Sep 2007 08:21:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=Zlz2SYupkLQN8JZSvAAw3zvTQMybx4IdVaoljpncx4uZtRSpKWyVCiWYMlpd3zAQhvkswg7Pg5NU9IdCvTk0Ft7BJIVLPta8yxWmhFJmnNUMrLeSqg+/6Wi6hE4Xz5GcTtnssX4d2G823ktwGWax7p7OyTq1vl3/NJqShV7L0pQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=rus9/3QQH8oALHtMftQ1/Vdpv/rnJqDXHOXDzNM53UY9B6cw0PK6o8uzPna7v0ieo6/0qkr2vlv6pFefTIvxwaF34OhmoVHM7T/Xj6uYJJWfUaMSw8HjB/e0tQcLHnXb6+s3e4FFMCNoWqDXa7zz/6h8hbAigzb64jKJi6j7rhg= Received: by 10.90.74.1 with SMTP id w1mr1031935aga.1188919293917; Tue, 04 Sep 2007 08:21:33 -0700 (PDT) Received: from ?192.168.0.100? ( [71.164.207.197]) by mx.google.com with ESMTPS id 7sm5838967agb.2007.09.04.08.21.31 (version=SSLv3 cipher=RC4-MD5); Tue, 04 Sep 2007 08:21:32 -0700 (PDT) User-Agent: Thunderbird 2.0.0.6 (X11/20070807) In-Reply-To: <86r6leeaq7.fsf@lola.quinscape.zz> Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: David Kastrup wrote: > Russ Brown writes: > >> David Kastrup wrote: >>> Russ Brown 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..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. >> Is it possible to specify more than one folder for the branches >> option? > > It is possible to adapt the config section to the actual layout. If > not otherwise, by starting with > git svn init > with a clean slate, editing the config file, and only then actually > fetching stuff. > > However, git-svn will not magically start guessing that you changed > your structure around. You have to edit the configuration > appropriately. > That's why I suggested that a method involving detecting branches based on whether the directory is a copy of trunk or another branch might 'magically' work in all scenarios. I've used a similar branch 'scanning' technique before for a different reason. But I realise there may be technical reasons as to why that might not be possible. -- Russ