Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I force a remote hg repo to do hg update after I push to it?

Tags:

I am writing code in a mercurial repository on my laptop, which I then push to a server via hg push, and then on the server, I run hg update and then run my newly-written code on the server. Is there any way to force the repo on the server to be automatically updated to the latest revision after I push to it from my laptop, so I can save the step?

like image 472
Ryan C. Thompson Avatar asked Nov 29 '10 01:11

Ryan C. Thompson


1 Answers

Look at the following entry on HG faq : Any way to 'hg push' and have an automatic 'hg update' on the remote server?.

As per the Faq, you can use the hooks to automatically call "hg update" after a push

[hooks] changegroup = hg update >&2 

This goes in .hg/hgrc on the remote repository. Output has to be redirected to stderr (or /dev/null), because stdout is used for the data stream.

like image 178
pyfunc Avatar answered Sep 23 '22 07:09

pyfunc