我的工作区 1 有一些搁置的更改。现在我需要将该架子移至工作区2。我正在尝试以下命令,但没有成功。你也可以看到我遇到的错误。
C:\source\workspace1>p4 -c workspace1 unshelve -s changelistworkspace1# [-f] [-n] [-c changelistworkspace2#] [-S workspace2Stream]
错误:
[-f] - file(s) not in client view.
<br />
[-n] - file(s) not in client view.
<br />
[-c - file(s) not in client view.
<br />
changelistworkspace2#] - file(s) notin client view.
<br />
[-S - file(s) not in client view.
<br />
workspace2Stream] - file(s) not in client view.
我是个新手,所以如果这是一项简单的任务但我遇到了问题,请原谅。我用来指导我的资源是:
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_unshelve.html
我也曾护目镜,但没有运气。我还发现一个资源说 P4V 的取消搁置对话框中有一个选项,但我没有该选项。
问题是,由于文件位于两个不同的流中,而不是取消搁置,我需要将更改列表的所有权更改为新工作区。现在我可以毫无问题地取消搁置。
要更改所有权,我右键单击 P4V 中的更改列表并选择更改所有权。
如果两个工作区属于同一用户,或者为更改列表授予了相关权限:
转到您的初始工作区 [client1]
p4 shelve -c <changelist_x>
转到您的第二个工作区 [client2]
p4 unshelve -s <changelist_x>
您必须在目标工作区中为 要移动到的搁置文件。
示例 - “admin”用户在更改 12118 中有一些搁置的文件
$ p4 changes -s shelved -u admin
Change 12118 on 2014/06/25 by admin@admin14streams *pending* 'original shelve changes by admi'
另一位用户创建了一个包含描述和内容的变更列表 将那些搁置的文件删除到其更改列表中。
$ p4 change
$ p4 unshelve -s 12118 -c 12119
//depot/r1.0/bar#1 - unshelved, opened for edit
//depot/r1.0/foo#1 - unshelved, opened for edit
在 P4V 中,要取消搁置其他用户的更改:
1. Go to the Pending tab
2. Click on the Filter so that it shows the changes
for the other user/workspace
3. Select the shelved change, right-click and select 'Unshelve Files'
参考文献
http://answers.perforce.com/articles/KB_Article/Changing-the-Owner-of-a-Pending-Changelist
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_unshelve.html