Search code examples
gitsvnmercurialclone

Cloning repository within certain period


I am working on a research and I would like to investigate git, Mercurial, and svn repositories. However, some of the repositories that I am looking for is huge and it is hard to inspect the complete history. So, I would like to know if there is any way where I can clone a repository between 2 dates or from 2009 - 2013 for example?

I would like to know how to do so for git, mercurial, and svn if possible.

Thanks in advance,


Solution

  • With mercurial there are no such things as partial clones limited to a certain time frame.

    If you can actually clone the repo, then limiting log output to a certain time span is easy (also check hg help dates):

    hg log -d"31/1/2013 to 24/12/2014"

    And in svn similarly:

    svn log -r {2013-01-31}:{2013-12-31}

    If you really need and want and must make partial clones, you can use with mercurial the convert extension. But that usually is quite slow when used over network; thus a complete clone likely is faster.