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

git-svn with multiple branch directories

From
GOGuido Ostkamp <git@ostkamp.fastmail.fm>
Date
Mar 19, 2009, 23:17 UTC
Message-ID
<alpine.LSU.2.01.0903200002390.29898@bianca.dialin.t-online.de>
Hello,

I am trying to create a git repo that tracks an SVN repo with multiple branch directories.

Is there any way to get this done easily?

It seems the 'git svn' command allows only to specify one 'trunk', 'branches' and 'tag' directory.

The example usecase is the OpenOffice.org repo (it's just a private experiment). I got this svn-sync'ed within 4 evening sessions, the SVN size is about ~8 GB with ~270000 commits. Unfortunately their structure is

   branches/
   contrib/
   cws/
   dist/
   patches/
   tags/
   trunk/
where 'cws' and 'branches' both hold branches.
I have seen a web-based article telling one should
   git svn clone <URL>/trunk repo.git

first, and then hack the repo.git/.git/config file manually to add entries like

   [svn-remote "b1"]
         url = $SVN_REPO_URL/branches/b1
         fetch = :refs/remotes/b1
   [svn-remote "b2"]
         url = $SVN_REPO_URL/branches/b2
         fetch = :refs/remotes/b2
   [svn-remote "c1"]
         url = $SVN_REPO_URL/cws/c1
         fetch = :refs/remotes/c1
   ...
to later use
   git svn fetch <branchname>

for each branch. But even if that worked, their seems to be no easy way to detect newly created branches etc. Additionally, I get two entries listed in 'git branch' for each, one of which with extension '@1' (seems to point ot the branch point). This doesn't seem to be the case for repo's with only one branch directory converted the normal way.

Any ideas?
Best regards
Guido
Next: Eric Wong
Message 1 of 2 in “git-svn with multiple branch directories”
  1. Guido OstkampMar 19, 2009
  2. Eric WongMar 20, 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.