tags:

views:

107

answers:

1

HI,

Is there a way to export current hg repository head in a tar ball? I don't need all the hg meta files in the tar ball (e.g history/diff).

+4  A: 

Use hg archive -t tgz <targetpath> to export a clean version as a gzip'd tarball.

Alternatively, you can use a different -t flag value to specify a different output type. You can find all of the type (and other) options on the hg man page.

Amber
The next version of Mercurial (version 1.6) will guess the right archive type for you, so `hg archive foo.tar.bz2` is enough to get a bzip2-compressed tarball.
Martin Geisler