必须的将搁置的变更列表从主分支移动到分支?

发布于 2025-01-06 06:49:40 字数 183 浏览 1 评论 0原文

我想知道是否有任何方法可以将在 /main/ 上编辑创建的变更列表移动到分支 /dev/branch?

我有六个这样的变更列表,其中有很多文件。我搁置了所有文件,想将它们移至分支机构继续在那里工作。如果可能的话,我更愿意直接在 P4V 中执行此操作。

我将 P4V 2011.1 与 2010.2 P4 服务器一起使用。

I wonder if there is any way to move a Changelist which was created editing on /main/ to a branch /dev/branch?

I have six such Changelists with a lot of files in them. I shelved all files and would like to move them to the branch to keep working there. I would prefer to do this directly in P4V, if possible.

I'm using P4V 2011.1 with the 2010.2 P4 server.

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

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

发布评论

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

评论(5

不奢求什么 2025-01-13 06:49:40

从 Perforce 2013.1 开始,您可以使用分支规范或流作为映射,将文件搁置在一个分支中并将其取消搁置到另一个分支中。

这是文档,其中描述了新的-b-S 选项。

Starting with Perforce 2013.1, you can shelve a file in one branch and unshelve it into another, using a branch spec or stream as the mapping.

Here is the documentation which describes the new -b and -S options.

耀眼的星火 2025-01-13 06:49:40

我相信您可以右键单击已编辑的文件并选择重命名/移动...

如果这不起作用,您可能必须使用命令行并执行 p4 move -f old_file new_file 并移动到另一个分支。

注意:就其价值而言,这适用于分支,但不适用于流。

I believe that you can right-click on an edited file and choose Rename/Move....

If that does not work, you'll probably have to use the command line and do p4 move -f old_file new_file and move to another branch.

Note: For what it's worth, this works for branches but not streams.

长不大的小祸害 2025-01-13 06:49:40

我自己没有尝试过,但我想这应该是可能的:

  1. 将您的客户端更改为包含目标分支映射的工作区
  2. 选择挂起的更改列表并将其取消搁置(或调用 p4 unshelve -s; 从命令行

来自 p4 手册:

A successful unshelve operation places the shelved files on the user's 
workspace with the same open action and pending integration history as 
if it had originated from that user and client.

I haven't tried this myself, but I would imagine this should be possible:

  1. Change your client to a workspace that contains mappings for the destination branch
  2. Select the pending changelist and unshelve it (or call p4 unshelve -s <number> from the command line

From the p4 manual:

A successful unshelve operation places the shelved files on the user's 
workspace with the same open action and pending integration history as 
if it had originated from that user and client.
萌化 2025-01-13 06:49:40

您还可以使用“p4 move -f /main/... /dev/branch/...”来完成此操作。

  1. 确保 /main/... 中唯一可编辑的文件是您想要移动的文件。在任何其他变更列表
  2. 命令行中搁置并恢复文件:“p4 move -f /main/... /dev/branch/...”
  3. 变更集中的文件现在位于 /dev/branch 上,标记为需要解析
  4. 解析每个文件就像普通的冲突一样

You can also use "p4 move -f /main/... /dev/branch/..." to accomplish this.

  1. make sure that the only editable files you have in /main/... are the ones you wish to move. Shelve and revert files in any other changelist
  2. command line: "p4 move -f /main/... /dev/branch/..."
  3. the files in the changeset are now on /dev/branch marked as requiring resolve
  4. Resolve each file just as you would an ordinary conflict
べ映画 2025-01-13 06:49:40
  1. /main/ 上提交
  2. 将变更列表集成到 /dev/branch/
  3. 回滚或撤销 /main/ 上的变更列表

这使您能够解决如果有冲突的话。
缺点是退出 /main/ 上的更改列表,这不太好。

  1. submit it on /main/
  2. integrate the changelist to /dev/branch/
  3. rollback or backout the changelist on /main/

This allows you to resolve conflicts if there are any.
The disadvantage is the backing out of the changelist on /main/ which is not pretty.

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