P4 已提交文件的搁置

发布于 2024-09-26 22:04:53 字数 121 浏览 6 评论 0原文

是否有任何选项可以搁置曾经提交的文件?我需要公开它们以进行代码审查。我尝试获取旧版本并搁置它们以生成类似 back-diff 的内容,但这对我不起作用:虽然搁置中的文件是旧文件,但 P4V 中的 diff 认为它们与新文件相同。

Is there any option to shelve files that have been once committed? I need to expose them for a codereview. I've tried to fetch old versions and shelve them to produce something like back-diff, however it doesn't work for me: although files in shelve are old one, diff in P4V thinks they're identical to new ones.

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

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

发布评论

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

评论(3

梦里梦着梦中梦 2024-10-03 22:04:53

您可以将提交的变更列表与先前状态的软件仓库进行比较。在历史记录选项卡中(菜单栏中的“查看”->“历史记录”),选择感兴趣的更改列表。将更改列表拖动到上一个更改列表编号上(确保您选择了软件仓库/工作区的顶层,或者至少选择了足够高的点来包含所有更改)。这将打开一个对话框,该对话框是一种目录差异,它将显示所有更改的文件。使用工具栏中的箭头在更改的文件之间移动。使用拖放功能将旧文件拖到新文件上,以查看文件之间的更改。

使用命令行,您也可以执行此操作:假设您的更改列表是 1300

p4 diff2 ...@1299    ...@1300

,但这使用纯文本“diff”。

You can diff a submitted changelist against the depot at a previous state. In your history tab, (View -> History in Menu Bar), select the changelist of interest. Drag the changelist onto the previous changelist number (be sure you have the top level of your depot/workspace selected, or at least a high enough point to include all your changes). This will open up a dialog which will be a type of directory diff which will show all the changed files. Use the arrows in the toolbar to move between changed files. Use the drag and drop and drag the old file onto the new one to see the changes between the files.

With the command line you can also do this: let's pretend your changelist is 1300

p4 diff2 ...@1299    ...@1300

but this uses the text-only 'diff'.

誰認得朕 2024-10-03 22:04:53

要生成您想要的“back-diff”,您需要执行以下操作:

  1. 将相关文件同步到您感兴趣的修订版(p4 帮助同步)
  2. 将相关文件检出到新的更改列表中(p4 帮助编辑)
  3. 同步将相关文件添加到头修订版(p4 帮助同步)
  4. 通过接受目标来解析您签出的文件(p4 帮助解析)
  5. 搁置文件(p4 帮助搁置)

您现在可以提供搁架作为所做更改的差异对着头。

To produce the "back-diff" you wanted, you need to do the following:

  1. Sync the relevant files to the revision you're interested in (p4 help sync)
  2. Check out the relevant files into a new changelist (p4 help edit)
  3. Sync the relevant files to the head revision (p4 help sync)
  4. Resolve the files you have checked out by accepting target (p4 help resolve)
  5. Shelve the files (p4 help shelve)

you can now provide the shelf as a diff of the changes that were made against head.

三寸金莲 2024-10-03 22:04:53

否。文件已提交。

您想要取消更改列表,搁置该更改列表,然后再次取消更改列表并提交以将软件仓库恢复到提交之前的状态。

如何执行此操作

  1. 在 P4V 中,选择“已提交的变更列表”选项卡(“查看”>“已提交的变更列表”)并找到变更列表。右键单击更改列表并选择“返回已提交的更改列表 ###”。它将提示您创建一个新的待处理更改列表。

  2. 在“待处理更改列表”选项卡(“查看”>“待处理更改列表”)中,搁置刚刚创建的新更改列表。

  3. 重复步骤 1,创建新的待定更改列表。

  4. 提交。提交

No. The files have been committed.

You want to back out the changelist, shelve that changelist, then back out the changelist again and submit to restore the depot to the state before you submitted.

How to do this

  1. In P4V, select the 'Submitted Changelists' tab (View > Submitted Changelists) and find the changelist. Right-click the changelist and select 'Back Out Submitted Changelist ###'. It will prompt you create a new pending changelist.

  2. In the 'Pending Changelist' tab (View > Pending Changelists), shelve the new changelist you just created.

  3. Repeat step 1, creating a new pending changelist.

  4. Submit.

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