Mercurial outbound hook

I am looking to create a Mercurial hook that pushes to the backup remote repository when I click on the local repository. I thought I could hook an “outgoing” hook, but this creates an endless loop that is not very good. So, like a post-pushing hook, or would it be better for the repository that I click to have an “inbound” hook to click on the remote backup instead?

+3
source share
1 answer

For each main command (X), there is a hook post-Xand pre-X.

However, if the goal is to create a remote backup of the local recipient repository, I would do this in the "changegroup" in the local repository.

When solving this problem in the past, I just installed cron jobs for periodically dragging and dropping from the local state to the backup, which can lag far behind, but does not leave a pushing user waiting to be clicked (hooks are executed in the foreground).

+6
source

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


All Articles