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

git-svn and a nested branches folder

From
RBRuss Brown <pickscrape@gmail.com>
Date
Sep 4, 2007, 14:42 UTC
Message-ID
<46DD6EEA.9010304@gmail.com>
Hi,

I'm having some trouble with using git-svn to fetch a repository, and I think it's because the repository doesn't store branches as a flat list directly under the 'branches' directory.

Basically, we have a structure like this:
|
+-trunk
+-tags
+-branches
  + category-a
    + branch-a
    + branch-b
  + category-b
    + branch-c
    + branch-d

etc. category-a and category-b are simple directories created using svn mkdir. The branches are created using svn cp.

It helps us to organise the branches better, but the rationale is besides the point. The problem is that git-svn seems to want to treat category-a and category-b as branches, which isn't right at all. As a result, git-svn seems to skip most (if not all) revisions that occur in these directories and creates a lot of entries in unhandled.log.

I've also encountered an index corruption in one of the .git/svn/<branch>/index files which I think it probably related.

I've had a quick look at the source myself, but perl isn't my strong point. What I think it should do is something like recurse down the tree from the directory given looking for folders that copy from trunk (or some other branch that already exists). That would work perfectly well for the default flat branch storage method as well as the one we use.

The only other problem is in branch naming, which could clash if you only use the outer-most directory name, so I'd suggest something that involves concatenating the folders in the path relative to 'branches' to keep them unique (if git can handle slashes in branch names then all the better).

Thanks for reading.
-- 
Russ
Next: David Kastrup
Message 1 of 11 in “git-svn and a nested branches folder”
  1. Russ BrownSep 4, 2007
  2. David KastrupSep 4, 2007
  3. Russ BrownSep 4, 2007
  4. David KastrupSep 4, 2007
  5. Russ BrownSep 4, 2007
  6. Peter BaumannSep 4, 2007
  7. Russ BrownSep 4, 2007
  8. Eric WongSep 5, 2007
  9. Russ BrownSep 5, 2007
  10. Eric WongSep 5, 2007
  11. Russ BrownSep 5, 2007

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.