tags:

views:

93

answers:

2

As part of my release process, I want to create a zip file that is basically a dump of the hg working dir at the time of that particular release. What's the easiest way to do this in an automated way?

BTW, if I simply "zip -r proj.zip" the zip will contain all sorts of things I don't want -- like compiled files, emacs auto-backups, and, yes, the .hg directory itself...

+5  A: 

Use hg archive:

hg archive -t zip /destination/path/zipfile.zip

It also takes the standard -r option to archive a revision other than the tip.

Niall C.
Exactly what I needed. Thanks,Z
Zorzella
Newer version will even guess the type directly from the file extension, so `hg archive foo.zip` is enough.
Martin Geisler
A: 

How about hg archive?

JWWalker