Download an exposed .hg directory
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Download a .hg directory exposed on the web, e.g., even if it has directory listing disabled.

How to download a mercurial hg directory

Follow these steps to download the sources:

  • Run the script: python
    • it downloads the manifest and changelog files as described in the documentation.
    • then it runs hg --debug manifest to get a list of files.
    • then it tries to download all those files.
  • You now have an incomplete .hg directory. Use the convert extension to fix it.
    • add the convert extension to the hgrc.
    • run hg convert --config convert.hg.ignoreerrors=True REPO REPOFIX
  • Now you have a correct mercurial repo. Run hg update -C to restore all files.