# git svn clone with funky tags layout

3 messages from 2013-11-05 to 2013-11-06. Participants: Jim Garrison, Michael J Gruber.
Thread: https://gitlist.dev/t/35284

## Jim Garrison, 2013-11-05 17:16

Subject: git svn clone with funky tags layout
Message-ID: <0C723FEB5B4E5642B25B451BA57E273041FD78E9@S1P5DAG3C.EXCHPROD.USA.NET>
URL: https://gitlist.dev/e/0C723FEB5B4E5642B25B451BA57E273041FD78E9%40S1P5DAG3C.EXCHPROD.USA.NET

```
I'm doing a one-time migration of an svn project.  For historical reasons our repo layout is weird:

    trunk/reporting/reporting_app

    tags/something_else
    ....
    tags/reporting_app-2.3.45
    tags/reporting_app-2.4.46
    tags/reporting_app-2.4.0
    tags/reporting_app-2.4.1
    ....
    tags/more_stuff

I want to migrate the trunk plus only the 2.4.* tags.  I tried giving a wildcard in the config

[svn-remote "svn"]
        noMetadata = 1
        url = http://subversion.tld.com/svn/DevJava
        fetch = trunk/Reporting/reporting_app:refs/remotes/trunk
        tags = tags/reporting_app-2.4.*:refs/remotes/tags/*

but this does not work:

    Invalid pattern in 'tags/reporting_app-2.4.*': reporting_app-2.4.*

On the off chance that it might work I also tried

            tags = tags/reporting_app-2.4.*:refs/remotes/tags/reporting_app-2.4.*

but that produces the same error message.

Is there a way to accomplish this or should I just move the tags I want to import into a separate directory in subversion first?  I'd rather not disturb svn but can do that if it's the only way.

```

## Michael J Gruber, 2013-11-06 14:02

Subject: Re: git svn clone with funky tags layout
Message-ID: <527A4C0C.7090400@drmicha.warpmail.net>
URL: https://gitlist.dev/e/527A4C0C.7090400%40drmicha.warpmail.net
In-Reply-To: <0C723FEB5B4E5642B25B451BA57E273041FD78E9@S1P5DAG3C.EXCHPROD.USA.NET>

```
Jim Garrison venit, vidit, dixit 05.11.2013 18:16:
> I'm doing a one-time migration of an svn project.  For historical reasons our repo layout is weird:
> 
>     trunk/reporting/reporting_app
> 
>     tags/something_else
>     ....
>     tags/reporting_app-2.3.45
>     tags/reporting_app-2.4.46
>     tags/reporting_app-2.4.0
>     tags/reporting_app-2.4.1
>     ....
>     tags/more_stuff
> 
> I want to migrate the trunk plus only the 2.4.* tags.  I tried giving a wildcard in the config
> 
> [svn-remote "svn"]
>         noMetadata = 1
>         url = http://subversion.tld.com/svn/DevJava
>         fetch = trunk/Reporting/reporting_app:refs/remotes/trunk
>         tags = tags/reporting_app-2.4.*:refs/remotes/tags/*
> 
> but this does not work:
> 
>     Invalid pattern in 'tags/reporting_app-2.4.*': reporting_app-2.4.*
> 
> On the off chance that it might work I also tried
> 
>             tags = tags/reporting_app-2.4.*:refs/remotes/tags/reporting_app-2.4.*
> 
> but that produces the same error message.
> 
> Is there a way to accomplish this or should I just move the tags I want to import into a separate directory in subversion first?  I'd rather not disturb svn but can do that if it's the only way.
> 

Depending on whether there are more tags to skip or more to include, you can

A) use the standard refspec (--tags=tags/) and remove the superfluous
tag branches once git-svn is finished or

B) use multiple tag refspecs without wildcard:

tags = tags/reporting_app-2.4.0:refs/remotes/tags/2.4.0
tags = tags/reporting_app-2.4.1:refs/remotes/tags/2.4.1

I may have mixed up A and B ;)

Michael

```

## Jim Garrison, 2013-11-06 17:05

Subject: RE: git svn clone with funky tags layout
Message-ID: <0C723FEB5B4E5642B25B451BA57E273041FD80AD@S1P5DAG3C.EXCHPROD.USA.NET>
URL: https://gitlist.dev/e/0C723FEB5B4E5642B25B451BA57E273041FD80AD%40S1P5DAG3C.EXCHPROD.USA.NET
In-Reply-To: <527A4C0C.7090400@drmicha.warpmail.net>

```
> -----Original Message-----
> From: Michael J Gruber [mailto:git@drmicha.warpmail.net]
> Sent: Wednesday, November 06, 2013 6:03 AM
> To: Jim Garrison; git@vger.kernel.org
> Subject: Re: git svn clone with funky tags layout
> 
> Jim Garrison venit, vidit, dixit 05.11.2013 18:16:
> > I'm doing a one-time migration of an svn project.  For historical reasons
> our repo layout is weird:
> >
> >     trunk/reporting/reporting_app
> >
> >     tags/something_else
> >     ....
> >     tags/reporting_app-2.3.45
> >     tags/reporting_app-2.4.46
> >     tags/reporting_app-2.4.0
> >     tags/reporting_app-2.4.1
> >     ....
> >     tags/more_stuff
> >
> > I want to migrate the trunk plus only the 2.4.* tags.  I tried giving
> > a wildcard in the config
> >
> > [svn-remote "svn"]
> >         noMetadata = 1
> >         url = http://subversion.tld.com/svn/DevJava
> >         fetch = trunk/Reporting/reporting_app:refs/remotes/trunk
> >         tags = tags/reporting_app-2.4.*:refs/remotes/tags/*
> >
> > but this does not work:
> >
> >     Invalid pattern in 'tags/reporting_app-2.4.*': reporting_app-2.4.*
> >
> > On the off chance that it might work I also tried
> >
> >             tags =
> > tags/reporting_app-2.4.*:refs/remotes/tags/reporting_app-2.4.*
> >
> > but that produces the same error message.
> >
> > Is there a way to accomplish this or should I just move the tags I want to
> import into a separate directory in subversion first?  I'd rather not disturb
> svn but can do that if it's the only way.
> >
> 
> Depending on whether there are more tags to skip or more to include, you
> can
> 
> A) use the standard refspec (--tags=tags/) and remove the superfluous tag
> branches once git-svn is finished or
> 
> B) use multiple tag refspecs without wildcard:
> 
> tags = tags/reporting_app-2.4.0:refs/remotes/tags/2.4.0
> tags = tags/reporting_app-2.4.1:refs/remotes/tags/2.4.1
> 
> I may have mixed up A and B ;)

Thanks for the response. Since there was a lot of reorganization to be done I decided to just copy all the disparate directories into a new correctly structured  tree in svn first, and import from there.  Worked great.

```
