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).
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With