In Mercurial (hg), the equivalent of Git's git clone --depth 1 (which creates a shallow clone with only the most recent commit) is:
bashhg clone --noupdate <repository-url> hg update -r tip
hg clone --noupdate: This clones the repository but does not check out any files, similar to a shallow clone in Git.hg update -r tip: This updates the working directory to the latest revision (equivalent to the most recent commit in Git).--depth option like Git. The above approach is the closest equivalent, but it still downloads the full history of the repository (just without checking out files initially).--rev option to clone only up to a specific revision, but this is not exactly the same as Git's shallow clone.bashhg clone --rev tip --noupdate <repository-url> hg update -r tip
This will clone only the latest revision and update the working directory to that revision. However, Mercurial will still download the full history of the repository in the background, unlike Git's shallow clone.
This Chat is read-only. Login to resume chatting.