如何在 perforce 中重命名分支规范?

发布于 2024-08-15 05:43:03 字数 100 浏览 4 评论 0原文

我想知道如何在 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 技术交流群。

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

发布评论

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

评论(4

握住你手 2024-08-22 05:43:03

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).

北风几吹夏 2024-08-22 05:43:03

缺乏分支规范重命名会扩展到所有规范(用户、组、客户端、标签、作业等)。这是命令行可以派上用场的地方:

p4 branch -o OLDBRANCH | sed -e "s,OLDBRANCH,NEWBRANCH," | p4 branch -i && p4 branch -d OLDBRANCH

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:

p4 branch -o OLDBRANCH | sed -e "s,OLDBRANCH,NEWBRANCH," | p4 branch -i && p4 branch -d OLDBRANCH
你如我软肋 2024-08-22 05:43:03

检查此链接:

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.

说好的呢 2024-08-22 05:43:03

是的。但您需要进行 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.

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