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

git svn clone of messy repository

From
JGJason Greenbaum <jgbaum@lji.org>
Date
Jan 11, 2018, 00:29 UTC
Message-ID
<CAKNOR-JbAjE9URdFw_ZrqVeZot=emHFWLgpjhQ7uqUsJpRzx2A@mail.gmail.com>
Hi,

I'm in the process of using git svn to migrate several repos over to git and one repo, in particular, has a very challenging format. During the migration, I would also like to reorganize the repo. It looks something like this in svn:

myrepo
  trunk
    project_of_interest
    other_project1
    other_project2
    …
  branches
    FF-1.0
      project_of_interest
      other_project1
      other_project2
      …
   FF-1.1
      project_of_interest
      other_project1
      other_project2
      …

There is also a 'tags' directory at the toplevel, but that's not important to illustrate the issue I'm having. What I would like to do is to migrate ONLY the folder called 'project_of_interest' and preserve it's trunk, branches, and tags. I'm not sure this is possible directly with git svn clone, but here is what I've tried:

git svn clone \ --authors-file=$AUTHORS_FILE \ --prefix="" \ --trunk=trunk/project_of_interest \ --branches=branches/FF-1.0/project_of_interest \ --branches=branches/FF-1.1/project_of_interest \ svn://my-svn-server/myrepo \ project_of_interest.git

The trunk seems to become the 'master' branch just fine, but my svn branches are not pulled down. I'm not sure I have the syntax right or if this is even possible without first reorganizing the svn repo in place, updating the .git/config file, or by some other means. Any help would be much appreciated. I'm happy to provide more info as needed.

Thanks,
Jason
Next: Eric Wong
Message 1 of 2 in “git svn clone of messy repository”
  1. Jason GreenbaumJan 11, 2018
  2. Eric WongJan 11, 2018

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.