git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Bash <bash@genarts.com>
To: Daniel Pocock <daniel@pocock.com.au>
Cc: git@vger.kernel.org
Subject: Re: git-svn: cloning an SVN repo with sub-branches and sub-tags
Date: Thu, 29 Mar 2012 12:03:13 -0400 (EDT)	[thread overview]
Message-ID: <de61c3ca-6678-49da-8803-a78d9f25a3b6@mail> (raw)
In-Reply-To: <4F7467E1.3090004@pocock.com.au>



----- Original Message -----
> From: "Daniel Pocock" <daniel@pocock.com.au>
> To: git@vger.kernel.org
> Sent: Thursday, March 29, 2012 9:47:13 AM
> Subject: git-svn: cloning an SVN repo with sub-branches and sub-tags
> 
> I'm trying to use git-svn to clone a repo that has sub-branches and
> sub-tags
> 
> The SVN layout is like this:
> 
> branches/user1/workitem1
> branches/user1/workitem2
> branches/user2/workitem1
> branches/user2/workitem2
> 
> tags/v1.0
> tags/v1.1
> tags/debian/v1.0-1
> tags/debian/v1.1-1
> tags/debian/v1.1-2
> 
> In git, I would like to have branches with the same names, e.g.
> 
> branches/user1/workitem1
> branches/user1/workitem2
> branches/user2/workitem1
> branches/user2/workitem2
> 
> and tags like this:
> 
> 1.0  (notice I don't want to keep the v1.0, drop the v)
> 1.1
> debian/1.0-1
> debian/1.1-1
> debian/1.1-2
> 
> However, if I run
> 
> git svn clone \
>    -T trunk \
>    -t tags \
>    -b branches \
>    https://flactag.svn.sourceforge.net/svnroot/flactag \
>    flactag-git1
> 
> I don't get any of the branches or tags, and I get numerous warnings
> like this:
> 
> W: -empty_dir: branches/d_pocock/autotools/HTTPFetch.cc
> W: -empty_dir: branches/d_pocock/autotools/HTTPFetch.h
> W: Cannot find common ancestor between
> f475b655c10b55b36df8376a396c0d9534418617 and
> 7e277bfd626a1caa84681e93a7af73e0160eb2eb. Ignoring merge info.
> W: Cannot find common ancestor between
> f475b655c10b55b36df8376a396c0d9534418617 and
> a82cd9bd2197a89303558af9aad43fa0c23d1ddb. Ignoring merge info.
> 
> I have the impression that git-svn does not like the repository
> layout and it is not clear from the manual page how to make it 
> work.  Can anyone share any advice about this?

Complicated layouts can require a special git-svn configuration.  See the configuration section at the end of the git-svn manpage:

  http://schacon.github.com/git/git-svn.html

My usual work flow is:

  git svn init /path/to/git/repo
  cd /path/to/git/repo
  edit .git/config
  git svn fetch

In the [svn-remote] section of Git config you can have multiple fetch, branches, and tag entries as long as each entry maps to a unique Git ref.

HTH,
Stephen

      parent reply	other threads:[~2012-03-29 16:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 13:47 git-svn: cloning an SVN repo with sub-branches and sub-tags Daniel Pocock
2012-03-29 14:40 ` Dave Zarzycki
2012-03-30 12:16   ` Daniel Pocock
2012-03-30 16:20     ` Dave Zarzycki
2012-03-29 15:32 ` Ramkumar Ramachandra
2012-03-30 12:22   ` Daniel Pocock
2012-03-30 12:35     ` Ramkumar Ramachandra
2012-03-29 15:56 ` dag
2012-03-29 16:03 ` Stephen Bash [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

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

  git send-email \
    --in-reply-to=de61c3ca-6678-49da-8803-a78d9f25a3b6@mail \
    --to=bash@genarts.com \
    --cc=daniel@pocock.com.au \
    --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).