Good day. At the moment, on a project, a situation periodically arises when, due to inexperience or oversight, the developer merges the changes from the test branch (staging) into the master or into the work branch. I read and understood that with the help of precommit hooks in python, you can sort of solve the problem (that is, analyze the fact of merge before the commit and that the merge comes from staging, and roll back the commit). However, I did not find examples for mercurial, although, I think, the situation is common. It would be cool if someone shares a source or examples.

  • Found an example of such a link link . Take it as a basis. - Eugene

0