Add shallow clone to hg

Create issue
Issue #203 closed
Eric Seidel created an issue

Git and darcs offer a shallow clone option (--depth 1 for git and --lazy for darcs). Hg can accomplish a similar thing by running hg clone -r tip URL. This should be implemented following the same rules as shallow clones for git and darcs.

Keyword:

Comments (6)

  1. Erik Schnetter
    • removed comment

    Shallow cloning is a performance improvement only. I would wait with implementing this until we have experience in parallel checkouts, which can conceivably improve speed by an order of magnitude.

  2. Frank Löffler
    • removed comment

    Speed is not the only advantage of shallow clones. Smaller repository size is also something worth to consider.

  3. Eric Seidel reporter
    • changed status to open
    • removed comment

    I was actually incorrect about this. I misread the documentation of hg; -r tip will actually perform a full clone. It seems hg does not currently support shallow clones, but they are looking into it.

    On another note, the parallel checkout (using -p) has been quite stable for me lately, and it does significantly reduce checkout/update times. I am considering making parallel mode the default if the user's Perl supports threads, or at least letting users decide how many threads to use (currently -p is locked at 4 threads).

  4. Erik Schnetter
    • removed comment

    I would advertise the feature first, and wait for a few months' worth of bug reports, before making this the default.

  5. Log in to comment