Perforce 客户端规范中映射的特定文件是否可以设为不可编辑?

发布于 2024-07-25 01:08:40 字数 373 浏览 2 评论 0原文

例如,来自“已发布”仓库的客户端规范映射文件的某些部分。 有没有办法让这些所谓的已发布地图强制只读,即无法打开进行编辑?

例如(忽略[不可编辑]):

//Development/foo/... //client/foo/...
//Published/bar/1.0/... //client/bar/... [not editable]
//Published/qux/2.0/... //client/qux/... [not editable]

换句话说,我想防止文件被打开(例如,默认情况下被锁定),并且想知道是否可以在客户端规范级别强制执行。

如果没有,是否有一种方法无需将“已发布”仓库设置为对某些用户只读?

For example some parts of the client spec map files from a 'Published' depot. Is there a way for these so-called published maps to be forced read-only, i.e. they cannot be opened for edit?

For example (ignoring [not editable]):

//Development/foo/... //client/foo/...
//Published/bar/1.0/... //client/bar/... [not editable]
//Published/qux/2.0/... //client/qux/... [not editable]

In other words I want to prevent files from being opened (say, being locked by default) and am wondering if this can be enforced at the client spec level.

If not, is there a way available without making the 'Published' depot read-only to certain users?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

孤独难免 2024-08-01 01:08:41

您可以使用p4锁定,它禁止其他人提交更改。

您还可以管理用户访问权限,请参阅 p4 保护 和 p4 组。 我相信这可以逐个文件地使用。

you can use p4 lock, which prohibits others from submitting changes.

you can also manage user access, see p4 protect and p4 group. i believe this can be used on a file by file basis.

网白 2024-08-01 01:08:41

您可以创建一个虚拟客户端并将这些文件锁定在虚拟客户端上。 然后,不要让任何人使用该客户端,例如将其放在服务器上。

You could create a dummy client and lock those files on the dummy client. Then, just don't let anyone use that client, e.g. by putting it on a server.

狠疯拽 2024-08-01 01:08:40

正确执行此操作的唯一方法是通过 Perforce 权限表。 您可以使用 p4 Protect 命令或通过 P4V 中的管理菜单来实现此目的。

只需打开它 - 您需要管理员权限 - 并向表中添加一行以将这些文件标记为只读。 这将允许您的客户端同步到文件,但不允许打开进行编辑(或删除等)。

您对权限表拥有最终控制权。 您还可以对其进行改进,仅允许一部分用户能够修改该文件,而其他人则将其视为只读。

Perforce 管理指南在权限表上非常好。 直接链接此处

The only way to do this properly is via the Perforce permissions table. You get to this either with p4 protect command or via the Admin menu in P4V.

Just open it up - you need admin rights - and add a line to the table to mark those files as read only. That will allow your clients to sync to the files but not be allowed to open for edit (or delete etc).

You have ultimate control in the permissions table. You could also refine this to allow just a subset of users to be able to modify the file, while everyone else sees it as read only.

The Perforce admin guide is pretty good on the permissions table. Direct link here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文