0

How do you download a specific folder from a Mercurial repo? This is a similar question to partial cloning, but I don't want to actually create a local repo, since I won't be versioning these files. I just want to quickly download a specific folder containing a few KB worth of files from a repo that's several hundreds MB in size.

Specifically, I want to download all the entire "examples/plugins" folder from the Gazebo project.

I've tried searching hg's manpage and Google, but all my searches keep bringing me back to pages that assume I want to create a full repo and make a partial clone or narrow clone, which hg doesn't support.

Community
  • 1
  • 1
Cerin
  • 55,951
  • 85
  • 291
  • 487
  • Sounds like you want `hg archive`, but for a remote repo and that isn't supported either (see [here](http://stackoverflow.com/a/2351128)). – Edward Apr 08 '15 at 21:27

1 Answers1

1

If the Mercurial repository is running hgweb, it's possible to download a specific folder remotely. For example for the official hg repository, you can download https://www.mercurial-scm.org/repo/hg/archive/REVISION.tar.bz2/SUBPATH/.

Example: https://www.mercurial-scm.org/repo/hg/archive/19c5b0913960.tar.bz2/contrib/

This uses the 'hg archive' functionality Edward mentions, but through the web-interface.

Vadim Kotov
  • 7,766
  • 8
  • 46
  • 61
Mathiasdm
  • 1,741
  • 13
  • 25