Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to export current hg repository head in a tar ball

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

like image 655
michael Avatar asked May 03 '10 20:05

michael


People also ask

What does hg commit do?

Use the command hg update to switch to an existing branch. Use hg commit --close-branch to mark this branch head as closed. When all heads of a branch are closed, the branch will be considered closed.

What does HG update do?

Update sets the working directory's parent revision to the specified changeset (see hg help parents). If the changeset is not a descendant or ancestor of the working directory's parent and there are uncommitted changes, the update is aborted.


1 Answers

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.

like image 65
Amber Avatar answered Sep 19 '22 15:09

Amber