P4 已提交文件的搁置
是否有任何选项可以搁置曾经提交的文件?我需要公开它们以进行代码审查。我尝试获取旧版本并搁置它们以生成类似 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将提交的变更列表与先前状态的软件仓库进行比较。在历史记录选项卡中(菜单栏中的“查看”->“历史记录”),选择感兴趣的更改列表。将更改列表拖动到上一个更改列表编号上(确保您选择了软件仓库/工作区的顶层,或者至少选择了足够高的点来包含所有更改)。这将打开一个对话框,该对话框是一种目录差异,它将显示所有更改的文件。使用工具栏中的箭头在更改的文件之间移动。使用拖放功能将旧文件拖到新文件上,以查看文件之间的更改。
使用命令行,您也可以执行此操作:假设您的更改列表是 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
but this uses the text-only 'diff'.
要生成您想要的“back-diff”,您需要执行以下操作:
您现在可以提供搁架作为所做更改的差异对着头。
To produce the "back-diff" you wanted, you need to do the following:
you can now provide the shelf as a diff of the changes that were made against head.
否。文件已提交。
您想要取消更改列表,搁置该更改列表,然后再次取消更改列表并提交以将软件仓库恢复到提交之前的状态。
如何执行此操作
在 P4V 中,选择“已提交的变更列表”选项卡(“查看”>“已提交的变更列表”)并找到变更列表。右键单击更改列表并选择“返回已提交的更改列表 ###”。它将提示您创建一个新的待处理更改列表。
在“待处理更改列表”选项卡(“查看”>“待处理更改列表”)中,搁置刚刚创建的新更改列表。
重复步骤 1,创建新的待定更改列表。
提交。提交
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
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.
In the 'Pending Changelist' tab (View > Pending Changelists), shelve the new changelist you just created.
Repeat step 1, creating a new pending changelist.
Submit.