Git-svn clone the last few revisions

It can be awfully tempting to make some changes to an existing open-source project [1]. Some of that excitement diminishes when one realizes how long a git-svn clone will take on a large project repo, like Python. The gain git-svn gives you in terms of quick history lookup is taken as cost in the beginning.

Instead, we can do a “shallow-copy” to get the last few revisions. It seems that you need to use actual revisions numbers for the first argument to -r, but I could be wrong. I tried using HEAD~1000:HEAD

$ git-svn clone http://svn.python.org/projects/python/trunk/ python-dev -r 65000:HEAD.

If you find this is *still* taking too long, try canceling, changing into the directory and issue a:

$ git svn fetch

Good luck all!

Notes

  1. Finally got my first one into python, #4568: remove limitation in varargs callback example.

3 Comments on “Git-svn clone the last few revisions”

  1. Hannes says:

    That post helped me a lot, thanks!

    Is there a way to fetch more of the history later, i.e. after the initial cloning?

  2. Hannes says:

    This entry helped me a lot, thanks!

    Is there a way to fetch more of the SVN history later, i.e. after the initial cloning?

  3. Rinat K says:

    Reblogged this on Digitally Conscious and commented:
    Totally saves the day on svn repos with big revision number


Leave a reply to Hannes Cancel reply