git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Huybrechts <tom.huybrechts@gmail.com>
To: git@vger.kernel.org
Subject: git-svn: creating tags from a subdirectory of trunk
Date: Sun, 15 Mar 2009 22:18:41 +0100	[thread overview]
Message-ID: <632a37a0903151418u483ca6cal1582518b9120da8e@mail.gmail.com> (raw)

Hi,

I'm trying to setup a git mirror of a svn repository.  The tags in
this repository are not created trunk it self, but from subdirectories
of trunk. The tags and branches are in the standard places.
e.g:
/trunk/main -> tags/main-1
/trunk/plugins/foo -> tags/foo-1
/trunk/plugins/bar -> tags/bar-1

I run 'git svn clone -s svn-url target'. It starts going over the
history nicely until it reaches the first branch. It calls this branch
something like tags/tag-name@revision, and starts retrieving the
entire project history again from r1. This is repeated for every
branch.

I've created a very small standalone shell script that demonstrates the problem:

=====
#!/bin/bash

REPO=`pwd`/svn-repo
WC=`pwd`/svn-wc
svnadmin create $REPO
REPO=file://$REPO
svn co $REPO $WC
SUBDIR=$WC/trunk/subdir

mkdir $WC/tags $WC/trunk $WC/branches $SUBDIR
svn add $WC/*
svn commit -m "structure" $WC
svn cp -m "create a tag" $REPO/trunk/subdir $REPO/tags/1

git svn clone -s $REPO git-repo
=====


When you run this, the output of git-svn is:

=====
Initialized empty Git repository in /home/tom/experiment/git-repo/.git/
W: +empty_dir: trunk/subdir
r1 = 3b90e67a4d8e9a2d32d4389b0f6ac93e23f38a46 (trunk)
Found possible branch point:
file:///home/tom/experiment/svn-repo/trunk/subdir =>
file:///home/tom/experiment/svn-repo/tags/1, 1
Initializing parent: tags/1@1
r1 = 0ad93ba4a7f6c43de30ab4dd05161662b75a6adb (tags/1@1)
Found branch parent: (tags/1) 0ad93ba4a7f6c43de30ab4dd05161662b75a6adb
Following parent with do_switch
Successfully followed parent
r2 = ce47fc7b4e21000c84da63ad5f643c18118d1918 (tags/1)
Checked out HEAD:
  file:///home/tom/experiment/svn-repo/tags/1 r2
=====

Note the tags/1@1 and then starting over again from r1.

It's not so bad in this little example, but try this on a repository
with  200 tags and 16000 revisions...
So my question: is this normal or a bug ? Can I do something to import
this repository correctly ?

Thanks,

Tom

             reply	other threads:[~2009-03-15 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-15 21:18 Tom Huybrechts [this message]
2009-03-15 23:21 ` git-svn: creating tags from a subdirectory of trunk Eric Wong
2009-03-16 19:02   ` Tom Huybrechts
2009-03-16 21:08     ` Eric Wong
2009-03-17 14:43 ` Michael J Gruber

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=632a37a0903151418u483ca6cal1582518b9120da8e@mail.gmail.com \
    --to=tom.huybrechts@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 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).