什么是 Perforce“搁置”?文件?

发布于 2024-09-04 16:27:45 字数 54 浏览 2 评论 0原文

在 Perforce 中,什么是“搁置”文件?搁置在工作区中打开以进行编辑的文件的目的是什么?

In Perforce, what is a "shelved" file? What is the purpose of shelving a file that is open for edit in the workspace?

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

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

发布评论

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

评论(1

酷到爆炸 2024-09-11 16:27:45

来自 Perforce 文档

搁置是暂时的过程
在 Perforce 上存储正在进行的工作
服务器无需提交
更改列表。搁架在以下情况下很有用
你需要执行多个
开发任务(例如
来自更高优先级的中断
工作,跨多个测试
平台)在同一组文件上,
或之前共享文件进行代码审查
将您的工作提交到仓库。

p4 shelve 命令创建,
修改或丢弃搁置的文件
待定的变更列表。搁置的文件
坚持在仓库,直到他们
丢弃(通过 p4 shelve -d)
或替换为后续的p4架
命令。

搁置文件后,您可以恢复
或者在您的客户端中修改它们
工作区,并恢复搁置的
这些文件的版本到您的
带有 p4 取消搁置的工作区
命令。当文件被搁置时,
其他用户可以取消搁置的搁置
文件放入他们自己的工作区,或者
进入其他客户端工作区。

已搁置的文件还可以
通过 p4 diff、p4 进行访问
diff2、p4 文件和 p4 打印
命令,使用修订说明符
@=change,其中更改是待处理的
变更列表编号。

如果没有指定参数,p4
shelve 创建一个新的变更列表,添加
用户默认的文件
更改列表,以及(在用户之后
填写与所用表格类似的表格
通过p4提交),上架指定的
文件放入仓库。如果一个文件
图案已给出,p4货架货架
仅匹配该模式的文件。

From the Perforce documentation:

Shelving is the process of temporarily
storing work in progress on a Perforce
Server without submitting a
changelist. Shelving is useful when
you need to perform multiple
development tasks (such as
interruptions from higher-priority
work, testing across multiple
platforms) on the same set of files,
or share files for code review before
committing your work to the depot.

The p4 shelve command creates,
modifies, or discards shelved files in
a pending changelist. Shelved files
persist in the depot until they are
discarded (by means of p4 shelve -d)
or replaced by subsequent p4 shelve
commands.

After shelving files, you can revert
or modify them in your client
workspace, and restore the shelved
versions of those files to your
workspace with the p4 unshelve
command. While files are shelved,
other users can unshelve the shelved
files into their own workspaces, or
into other client workspaces.

Files that have been shelved can also
be accessed with the p4 diff, p4
diff2, p4 files, and p4 print
commands, using the revision specifier
@=change, where change is the pending
changelist number.

If no arguments are specified, p4
shelve creates a new changelist, adds
files from the user's default
changelist, and (after the user
completes a form similar to that used
by p4 submit), shelves the specified
files into the depot. If a file
pattern is given, p4 shelve shelves
only the files that match the pattern.

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