Subject: Problem importing from SVN repository with branches/tags at multiple levels using git-svn

From: Robert Hancock <[email-masked]>
Date: Wed, 15 Jan 2014 14:10:42 -0600

We have an SVN repository that has a structure for tags (likewise for
branches) like this:

tags/tag1
tags/tag2
tags/tag3/
tags/subdir/tag4
tags/subdir/tag5

The idea is that I want to have git-svn import everything inside subdir
as tags and everything else inside the root tags directory as tags, so I
end up with tag1-tag5 in Git. I've got tags= entries like this in the
Git configuration to try to achieve this:

tags = tags/subdir/*:refs/remotes/tags/*
tags = tags/*:refs/remotes/tags/*

My expectation was that everything inside subdir would match the first
line first and everything else would match the second line, so
everything would work out OK. Unfortunately it seems like for the tags
inside subdir, it's matching the second line and therefore trying to
import everything in there as directories inside one tag called subdir.
Changing the order of those lines doesn't seem to help either, it seems
determined to try to match to tags/* regardless of what order the lines
are in.

Clearly it would have been better if the repository had not been
structured this way. However, rearranging it now won't help since the
paths are like this in the SVN repository history.

The only solution I've found that kind of works is to use
tags/{tag1,tag2,tag3} instead of tags/*. Unfortunately there are a ton
of tags in that directory and adding in a giant list of tags there seems
to slow down the import process a great deal. Also, there are
potentially still tags being created in that root directory, so I would
have to keep regenerating and updating this list in the Git
configuration every time one was added. So this is not a good solution.
It would be much easier if I could get a wildcard solution to work here.

Any thoughts?

-- 
Robert Hancock
System Analyst
SED Systems
Email: [email-masked]