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

Re: git-svn: creating tags from a subdirectory of trunk

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Mar 17, 2009, 14:43 UTC
Message-ID
<49BFB701.3040800@drmicha.warpmail.net>
In-Reply-To
<632a37a0903151418u483ca6cal1582518b9120da8e@mail.gmail.com>
Tom Huybrechts venit, vidit, dixit 15.03.2009 22:18:
Show 15 quoted lines
> 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.

And I thought *I* had produced sick repos by abusing svn... There are also such niceties as /trunk/trunk/ in there.

The problem is that svn tags are branches (to the same extent that svn branches are branches...) and git svn treats them as such, but the hudson tags contain only subtrees. I think you have two options:

- Convert without tags, and try to assign real git tags later on based
on the output of svn log. (This assumes svn tags have not been abused as
branches.)
- Setup git svn configs for each subproject individually, since the tags
contain only subproject tags.

It seems as though hudson's tags have not been abused as branches, except for some messing with deletes and recreations. So the first approach may be worthwhile.

Michael
Previous: Eric Wong
Message 5 of 5 in “git-svn: creating tags from a subdirectory of trunk”
  1. Tom HuybrechtsMar 15, 2009
  2. Eric WongMar 15, 2009
  3. Tom HuybrechtsMar 16, 2009
  4. Eric WongMar 16, 2009
  5. Michael J GruberMar 17, 2009

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.