开发者

perforce codeline freeze

I have currently 3 codelines in my perforce depot

Main
Development
Release

Th开发者_JS百科e idea being changes will be integrated into Main from release and dev branches. But as of now some of the devs are making changes directly to Main branch. Is there a way to freeze check-ins for the "Main" codeline and allow integrations via branch mappings in perforce?

OR if there is any other best practice (restrictions) out there that can be applied to avoid direct check-ins into the Main branch.

Thx


As Adam said, you should use permissions to limit access to the Main branch. You can do this either by using the Admin tool, or by running p4 protect from the command line (as long as you have super user access).

You should limit the permissions for Main to read for most people, and allow write for those you trust to submit to the Main branch. You can also choose to give "normal" users open access instead of read, which will allow them to check files out, but not submit them.


Another thing to consider apart from just setting the permissions is the approach we are running for some of our branches:

We use a review tool (Reviewboard in our case) and have a Perforce trigger in place, which checks if there is a review in ReviewBoard that matches the following criteria:

  • there is a review associated with the current Perforce change number
  • the latest review has the "ship it" flag set to True
  • the reviewer in ReviewBoard is NOT the submitter of the change list.
  • the list of files in the review matches the list of files in the change list

You could be even more restrictive, e.g. that the reviewer has be to a special person (guard of the branch). The advantage to just setting hard permissions is that you get control over what to submit and in what quality. This would also enable you to submit important bugfixes to the main-branch without prior messing with p4 protect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜