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

working with a large repository and git svn

From
Joe Corneli <holtzermann17@gmail.com>
Date
Jan 12, 2011, 01:27 UTC
Message-ID
<AANLkTimKbS3ECzOaGtNgvx7DThJGH_DkPmg4ehKXGtwc@mail.gmail.com>
Greetings -

I am experiencing trouble with git svn, trying to import a large repository (7.9 gigs, ~54000 commits) from Git into SVN.

This has failed in a couple of different ways, depending on the operating environment. With Git version 1.7.3.5 running on Ubuntu 9.10, in the final step

  git svn dcommit --no-rebase
of the formula described below, I get:
 failing with "Can't fork at /usr/share/perl/5.10.0/Git.pm line 1261."
after committing just over 2000 revisions.

Previously, on Mac OS X 10.6.4 with git version 1.7.3.4, it made it through about 18000 commits before failing with some other error. (I don't have that one recorded at the moment.)

Separately from the latest attempt, I tried repacking the repository before doing the "git svn" stuff, with

  git repack -a -d --depth=250 --window=250 -f
but that also failed ("pack-objects died of signal 11").

Any tips for dealing with new, large, repositories would be appreciated. The sequence of commands I used are below the 8<.

Thanks, Joe

8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<
## Creating an svn repo

$ mkdir repo; $ svnadmin create repo; $ mkdir init; $ touch init/README; $ svn import init file://`pwd`/repo/init -m "Initial import"; $ svn checkout file://`pwd`/repo/init working;

## THIS PART FOLLOWS THE MODEL SUGGESTED BY THE FOLKS AT code.google.com ## (/Users/jac2349/planetary/destination/ IS THE LOCATION OF MY GIT REPO.)

$ mkdir cloning $ cd cloning $ git svn clone file:///Users/jac2349/planetary/repo/init $ cd init $ git fetch git:///Users/jac2349/planetary/destination/.git

$ git branch tmp $(cut -b-40 .git/FETCH_HEAD) $ git tag -a -m "Last fetch" last tmp

$ INIT_COMMIT=$(git log tmp --pretty=format:%H | tail -1) $ git checkout $INIT_COMMIT . $ git commit -C $INIT_COMMIT

$ git rebase master tmp $ git branch -M tmp master

$ git svn dcommit --no-rebase
$ mv .git/refs/tags/newlast .git/refs/tags/last
## BTW, THE --no-rebase FLAG KEEPS IT FROM BEING IMPOSSIBLY SLOW!
Next: Wesley J. Landaker
Message 1 of 12 in “working with a large repository and git svn”
  1. Joe CorneliJan 12, 2011
  2. Wesley J. LandakerJan 12, 2011
  3. Joe CorneliJan 13, 2011
  4. Jonathan NiederJan 13, 2011
  5. Joe CorneliJan 14, 2011
  6. Ramkumar RamachandraJan 14, 2011
  7. Jonathan NiederJan 14, 2011
  8. Michael HaggertyJan 14, 2011
  9. Optionally parse author informationRamkumar Ramachandra, Jan 14, 2011
  10. Joe CorneliJan 16, 2011
  11. Jonathan NiederJan 16, 2011
  12. Ramkumar RamachandraJan 16, 2011

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.