git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git svn clone with funky tags layout

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Nov 6, 2013, 14:02 UTC
Message-ID
<527A4C0C.7090400@drmicha.warpmail.net>
In-Reply-To
<0C723FEB5B4E5642B25B451BA57E273041FD78E9@S1P5DAG3C.EXCHPROD.USA.NET>
Jim Garrison venit, vidit, dixit 05.11.2013 18:16:
Show 33 quoted lines
> 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
Previous: Jim GarrisonNext: Jim Garrison
Message 2 of 3 in “git svn clone with funky tags layout”
  1. Jim GarrisonNov 5, 2013
  2. Michael J GruberNov 6, 2013
  3. Jim GarrisonNov 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.