Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a zip of my Mercurial repo for release?

Tags:

mercurial

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

like image 407
Zorzella Avatar asked Jul 30 '10 16:07

Zorzella


1 Answers

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.

like image 164
Niall C. Avatar answered Nov 01 '22 11:11

Niall C.