本文介绍了如何防止某人推多个头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些同事使用--force开关推动多个头,因为他们没有正确合并.

I have colleagues who push multiple heads by using the --force switch because they haven't merged properly.

有什么方法可以防止这种情况发生?

Are there any ways to prevent this?

推荐答案

您可以在服务器端使用pretxnchangegroup钩子来做到这一点.

You can do this with a pretxnchangegroup hook on the server side.

以下是一些示例: http://www.softwareprojects.com/resources/programming/t-mercurial-hook-forbid-2-heads-1910.html

所有这些钩子所做的就是确保在应用更改组之后,仍然只有一个头(或者,如果您想花哨的话,每个分支只有一个).

All those hooks are doing is making sure that after the changegroup is applied that there's still only one head (or only one per branch if you want to get fancy).

这篇关于如何防止某人推多个头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 04:40