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

Re: git-svn feature idea

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 21, 2011, 10:03 UTC
Message-ID
<4DD78DEE.5060206@drmicha.warpmail.net>
In-Reply-To
<BANLkTi=OHfHaHE86z8Ufj44J+Oxu8ec5ug@mail.gmail.com>
fREW Schmidt venit, vidit, dixit 21.05.2011 05:41:
Show 25 quoted lines
> Hey guys,
> Lately I've been doing a lot of permanent subversion to git
> conversions, and I keep running into braindead repo structures that
> give me pain to export.  The main one is this:
> 
> trying to check out MyProject:
> 
> trunk/MyProject
> trunk/OtherProject
> tags/MyProject-1.0
> tags/MyProject-1.1
> tags/OtherProject-1.0
> 
> So you see I can't just specify to git-svn that tags is the tags dir.
> I know a workaround (check out each tag separately and then use git
> fetch to put them all in the same repo) but that's really inefficient.
> 
> So really what would be great would be to be able to do the following:
> 
> git svn clone $repo --trunk=trunk/MyProject --tag=tags/MyProject-1.0
> (and --branch would be great too)
> 
> Anyway, I am fairly well versed with perl, so I could try my hand at
> writing such a feature, but I wouldn't really know where to start or
> if anyone other than me is even interested in something this.

If you scroll down to the config section in git-svn(1) you will find that you can use things like this:

fetch = trunk/MyProject:refs/remotes/foo/trunk tags = tags/MyProject-*:refs/remotes/foo/tags/*

I seem to remember you can even specify these as arguments to -t and such but haven't checked.

Uh. Wait. We allow only .../*/... and .../* on the left hand side, at least per the doc. So, you could either use the existing variant

tags = tags/{MyProject-1.0,MyProject-1.}:refs/remotes/foo/tags/*
or use your perl foo and lift the /*/ requirement.
Michael
Previous: fREW Schmidt
Message 2 of 2 in “git-svn feature idea”
  1. fREW SchmidtMay 21, 2011
  2. Michael J GruberMay 21, 2011

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.