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

Re: git svn clone a non-standard repository

From
Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
Date
Jun 25, 2008, 15:25 UTC
Message-ID
<g3to0t$35n$1@ger.gmane.org>
In-Reply-To
<48613DC5.2000506@freelock.com>
John Locke venit, vidit, dixit 24.06.2008 20:32:
Show 21 quoted lines
> Hi,
> 
> I'm trying to create a git repo of the Dojo Toolkit, which has a quite 
> non-standard layout. There are 4 modules to the current Dojo project 
> that I care about (and some others in the repo that I'm not interested 
> in). The problem is, the trunk code is split out into 
> <modulename>/trunk, while tags are in tags/<tagname>/<modulename> and 
> branches are in branches/<branchname>/<modulename>. e.g:
> 
> moduleA/trunk <- contains trunk development of moduleA
> moduleA/tags   <- empty
> moduleA/branches <- empty
> moduleB/trunk
> moduleB/tags
> moduleB/branches
> moduleC/trunk
> moduleC/tags
> moduleC/branches
> moduleD/trunk
> moduleD/tags
> moduleD/branches

All of those module?/{tags,branches} are empty, right? I assume branches follow the pattern below for tags.

Show 17 quoted lines
> moduleE/trunk <- I don't care about this one...
> trunk/   <- contains ancient version, not actual trunk
> tags/1.0.0/moduleA <- contains tagged version of moduleA
> tags/1.0.0/moduleB <- contains tagged version of moduleB
> tags/1.0.0/moduleC <- contains tagged version of moduleC
> tags/1.0.0/moduleD <- contains tagged version of moduleD
> tags/1.0.1/moduleA
> tags/1.0.1/moduleB
> ...
> 
> So I'd like to set up a git repo that tracks this SVN repository, and 
> allows me to see:
> moduleA/
> moduleB/
> moduleC/
> moduleD/
> ... in my checkout, whether I'm on trunk or a tag.

So you want one git repo, reflecting the modules simply by different subdirs? I'm afraid that raises similar problems like those I asked about in my (yet unanswered) post

http://permalink.gmane.org/gmane.comp.version-control.git/85861
> I've started with "git svn clone http://path/to/svn -T moduleA/trunk -t 
> tags -b branches", and it's been sucking down branches for a couple days 

This should give you all "modules" (as subsdirs) for all branches and tags already. svn branch "branchname" becomes git remote branch "branchname", svn tag "tagname" becomes git remote branch "tags/tagname". Note that your new git branch trunk will contain the contents of "moduleA" only.

> now, still not done. Can I set up moduleB/moduleC/moduleD as additional 
> remotes in this same repository, and end up with the desired result? Was 
> thinking I would add additional svn sections to .git/config, and then 
> git svn fetch -- will this work, or is there a better way?

If I understand your layout (and "desires") correctly then trunk will be your only problem: you want to map "module?/trunk" to subdir "module?" of branch "trunk". This is more or less the problem I'm facing. Regular expressions (other than the ones for branches and tags) in git svn config would solve this.

Michael
Previous: John LockeNext: John Locke
Message 2 of 5 in “git svn clone a non-standard repository”
  1. John LockeJun 24, 2008
  2. Michael J GruberJun 25, 2008
  3. John LockeJun 26, 2008
  4. John LockeJun 26, 2008
  5. John LockeJun 27, 2008

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.