Re: importing multi-project svn repositories
- From
Steven Grimm <koreth@midwinter.com>
- Date
- May 7, 2007, 18:06 UTC
- Message-ID
- <463F6A95.30207@midwinter.com>
- In-Reply-To
- <C05C5EF4-EC68-490B-946E-630117393F4E@drhanson.net>
David Hanson wrote:
> I'd like to import calc at the top level, put calc/tags/foo in git's > tags/calc/foo and calc/branches/baz in git's heads/calc/baz. Ditto for > calendar, spreadsheet, etc.
Try git-svn rather than git-svnimport. The latter, AFAIK, is no longer really maintained. The former will do what you want pretty easily. You just run it like
git svn clone --prefix=calc/ -T trunk -t tags -b branches \
http://svn/repo/url/calc gitrepoand it'll create a git repository called "gitrepo" with the calc project's trunk/tags/branches as git tags. Then do
git svn clone --prefix=spreadsheet/ -T trunk -t tags -b branches \
http://svn/repo/url/spreadsheet gitrepoand it will add the spreadsheet branches to the same repo. The "--prefix" option is needed to keep the branch namespaces from overlapping. git-svn will make an attempt to figure out the correct history of the branches and tags relative to the trunk so they look like sane git branches.
If you want to be able to check out calc and spreadsheet simultaneously, then you probably need to use git's submodule support, which is kind of a work in progress at the moment.
-Steve