Yai*_*vet 12 perforce unshelve branching-and-merging
使用Perforce Server 2012.2/538478,如何从主干到另一个分支取消托管文件?
当我尝试这样做时,我得到:
//filename... (not mapped to your workspace view)
Run Code Online (Sandbox Code Playgroud)
在Perforce 2013中,我发现这个令人难以置信的命令真正有用:
p4 unshelve -s <changlist#-with-shelved-files> -S //depot/streamname
Run Code Online (Sandbox Code Playgroud)
但是对于我目前使用的版本,我找不到任何帮助我解决这个问题.
有什么建议?
您正在查看正确的命令,但可能不是正确的参数.这就是我使用它的方式:
p4 unshelve -s 77655 -b MY_BRANCH_SPEC
Run Code Online (Sandbox Code Playgroud)
取消更改列表77655,使用指定的分支规范将文件映射到新分支.
关键的是,您需要确保指定的分支映射和当前工作空间映射都包含源文件和目标文件,否则您将收到"文件未映射"错误.
在花了一些时间搜索和阅读之后,我还没有遇到将搁置的更改列表搁置到另一个分支的具体示例。最后我整理了一个具体的例子。
Assuming you have a shelved changelist 324426 in Branch B1 and want to unshelve it to Branch B2.
Run Code Online (Sandbox Code Playgroud)
我能够创建分支规范,然后将更改列表搁置到另一个分支。这正是我所做的:
1. Create a text file named branchSpec.txt, with the content below: set you own Branch name and View.
Branch: B1_to_B2
View:
//depot/dev/main/B1/... //depot/release/B2/...
2. p4 branch -i < branchSpec.txt (in target directory)
3. p4 unshelve -s 324426 -b B1_to_B2 (in target directory)
Run Code Online (Sandbox Code Playgroud)
Viola,B1 中更改列表 324426 中搁置的文件现在已取消搁置到 B2 并准备提交。
其他答案对我不起作用,这就是我使用perforce 2014所做的:
例如,将View下的映射替换为
//depot/product/B1/... //depot/product/B2/...
Run Code Online (Sandbox Code Playgroud)在命令行中,运行
p4 unshelve -s <SOURCE_CL> -c <TARGET_CL> -b B1_to_B2
Run Code Online (Sandbox Code Playgroud)
遗憾的是,如果没有升级到2013.1并获得改进的不正常操作,您将需要通过以下方式手动复制数据:
p4 edit 您的其他流/分支中的文件p4 copy或p4 integrate为此,因为它们未在中继上提交