30

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).

Paolo
  • 20,112
  • 21
  • 72
  • 113
michael
  • 106,540
  • 116
  • 246
  • 346

1 Answers1

38

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.

In Mercurial 1.6+, you don't even need to specify the type with -t - you can just use hg archive <targetpath> and Mercurial will infer the proper type from the filename.

Amber
  • 507,862
  • 82
  • 626
  • 550