12

What can I do to import a SVN repository into git but only from a (known) revision number and onwards?

I've tried with:

git svn clone --authors-file=/home/ubuntu/svn-git-users.lst --revision=4151 -T trunk -b branch -t tags file://`pwd`/../svn-server-sync/MyRepo MyRepo 

But it fails with:

r4151 = e80c7c5923700d6c7594c91f172779af63a8511b (refs/remotes/snapshots) fatal: refs/remotes/trunk: not a valid SHA1

Can someone help me with this?

Thanks in advance.

William Leara
  • 10,595
  • 4
  • 36
  • 58
scetoaux
  • 398
  • 7
  • 19
  • 1
    Would http://stackoverflow.com/questions/747075/how-to-git-svn-clone-the-last-n-revisions-from-a-subversion-repository help? that is: `-r 4151`, instead of `-r=4151` – VonC May 04 '10 at 11:58
  • @VonC Thanks, it looks like that's my problem. I've tried -r4151:HEAD and, at least for the moment, it's running. My repo is several GB size so it will take a while... :) – scetoaux May 04 '10 at 12:12

1 Answers1

9

To follow up on my comment, it seems it might be a syntax issue:

-r4151, 

instead of -r=4151 (no 'equal' sign needed).
The question How to git-svn clone the last n revisions from a Subversion repository? provides some good examples.

The OP reports trying -r4151:HEAD, which for now is importing the SVN repo.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250