From Archiveteam
Jump to navigation Jump to search
Mercurial repositories
Status Special case
Archiving status Special case
Archiving type Unknown
Project source mercurial-grab
Project tracker mercurial
IRC channel #archiveteam-bs (on hackint)
Data[how to use] archiveteam_bitbucket

Mercurial, also known by its command line tool hg, is a distributed version control system. Its development started at almost the same time and with similar goals as Git.


When Bitbucket announced its deprecation and removal of Mercurial repositories, a reusable archive project was created that can archive Mercurial repositories in general. It simulates hg clone --stream URL. The resulting archives can be cloned again directly from the Wayback Machine, e.g. hg clone --stream

Repo cloning

From the hg docs:

In normal clone mode, the remote normalizes repository data into a common exchange format and the receiving end translates this data into its local storage format. --stream activates a different clone mode that essentially copies repository files from the remote with minimal data processing. This significantly reduces the CPU cost of a clone both remotely and locally. However, it often increases the transferred data size by 30-40%. This can result in substantially faster clones where I/O throughput is plentiful, especially for larger repositories. A side-effect of --stream clones is that storage settings and requirements on the remote are applied locally: a modern client may inherit legacy or inefficient storage used by the remote or a legacy Mercurial client may not be able to clone from a modern Mercurial remote.

hg clone produces a directory with a working copy, plus the .hg directory containing version control data. However, this is internally sent as a bundle, which if captured can be unbundled normally.

hg network protocols (as of September 2020):