How to run "hg update" with a mercury input hook

What is the correct way to run hg update in an incoming hook?

It:

 [hooks] incoming.foo = hg update 

Or this

Or is there a more elegant way to do this?

+6
source share
1 answer

The FAQ makes the following suggestion:

 [hooks] changegroup = hg update 

This is in .hg / hgrc in the remote repository

So, this is a simple and correct way to do this. Your example uses incoming , but this hook is triggered once for each set of changes. The changegroup hook changegroup executed once after all changes have been pulled in, so I think it can satisfy your needs better.

If you need more control, you can create a hook in the script process to complete these tasks. Wiki has some good examples .

+8
source

Source: https://habr.com/ru/post/914006/


All Articles