Mercurial post-commit hook

287 views
Skip to first unread message

OJ

unread,
Jan 30, 2011, 5:43:26 AM1/30/11
to blogofile-discuss
Hey guys,

I choose to use hg over git for most of the stuff that I do and I just
thought I'd share a (very simple) post commit hook that works fine for
my needs. First, you obviously need to install hg on your server, set
up a repository where you're going to have the files stored by doing a
"hg init", and then create a file in the resulting .hg folder called
"hgrc". Inside that file add the following:

[hooks]
changegroup.update = hg update
changegroup.blogofile = blogofile build

Simple as that. If you want to add a copy step to move the content
elsewhere on the file system you can add another line like this:

changegroup.copy = cp -R _site/* /var/www/html

Obviously substitute the path with the one required.

Hope someone finds it uself.

Regards
OJ
Reply all
Reply to author
Forward
0 new messages