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.

2
  • 1
    Would stackoverflow.com/questions/747075/… help? that is: -r 4151, instead of -r=4151
    – VonC
    May 4, 2010 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 4, 2010 at 12:12

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.