本文介绍了强制锁定分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前在我创建了一个发布分支之后,但是当我们在发布之前有一段时间时,我有时会打开整个分支进行编辑,然后锁定所有文件,以防止任何人在代码冻结"期间修改任何内容发布分支.

Currently after I create a release branch, but when we have some time before we release, I sometimes open the entire branch for edit and then lock all files in order to prevent anybody from modifying anything during "code-freeze" period in the release branch.

有没有更好的办法?以我目前的方式这样做似乎可能是对锁定功能的错误使用,是否有更好的方法来防止某人在不使用分支的情况下检查代码.我虽然使用 P4 保护,但我不是这个 perforce 实例的管理员,而且处理可能有 100 行的保护文件也会变得很麻烦.

Is there a better way? Doing it my current way seems possibly like an incorrect use of the lock feature, is there a better way to keep somebody from checking in code without using branches. I though of P4 protect but I am not the admin on this perforce instance, and also dealing with the protect file at potentially 100s of lines would get cumbersome as well.

有什么想法吗?

推荐答案

P4 保护可能是大多数人的正确答案,正如其他答案中所述.

P4 protect is probably the right answer for most people as explained in other answers.

但是在我的组织中,我不能成为管理员,所以这样做的方法是在 perforce 中使用一个触发器脚本来读取非管理员具有写入权限的文本文件并检查分支是否出现在列表中.这样就不需要像 p4 保护这样的管理员访问权限了.

However in my organization I can't be the admin so way of doing this is to have a trigger script in perforce that reads a text file that non-admins have write access to and check whether branch appears on the list. This way admin access like p4 protect would need is not needed.

这篇关于强制锁定分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 08:45