如何在 perforce 中重命名分支规范?
我想知道如何在 perforce 中重命名分支规范(又名“分支映射”)。 P4V 客户端不允许您编辑分支规范名称。
仅添加另一个分支规范、复制设置并删除旧的设置是否安全?
I would like to know how to rename a branch specification (aka, a "branch mapping") in perforce. The P4V client does not allow you to edit the branch spec name.
Is it safe to just add another branch specification, copy the settings and remove the old one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Perforce 不提供重命名分支规范的机制。也许他们担心如果您去重命名一个脚本,可能会无意中破坏一些脚本?
是的,创建一个新的、复制旧的设置并将其删除是安全的(当然,前提是没有任何东西依赖于具有旧名称的分支规范)。
Perforce does not provide a mechanism to rename a branch specification. Perhaps they fear you may inadvertently break some scripts if you go and rename one?
Yes, it is safe to create a new one, copy the settings from the old and delete it (provided nothing is relying on a branch specification with that old name, of course).
缺乏分支规范重命名会扩展到所有规范(用户、组、客户端、标签、作业等)。这是命令行可以派上用场的地方:
Lack of branch spec renaming extends to all specs (users, groups, clients, labels, jobs, etc.). This is where the command line can come in handy:
检查此链接:
http://kb.perforce.com/article/24/renaming -depot-directories
该过程取决于您的服务器版本。例如,在 2009+ 服务器中,您可以使用 pedit 和 pmove 来重命名并保留文件历史记录。
Check this link:
http://kb.perforce.com/article/24/renaming-depot-directories
The procedure depends on your server version. For example in the 2009+ servers you use pedit and pmove to rename and keep your file history.
是的。但您需要进行 p4 集成才能完成文件。这就是 p4v“复制或重命名”的作用。使用重命名选项,这也会删除旧文件。
Yes. But you need to do an p4 integrate to get the files over. That is what p4v "copy or rename" does. Use the rename option, that also deletes the old files.