In Perforce, how to unshelve change from one branch to another one?

时间:2016-05-27 08:09:35

标签: perforce

I have two branches in Perforce, one is branchA another is branchB, in branchA I have a changelist contains several files, now I want to unshelve it to branchB, I use the following steps:

  1. Change perforce config to branchA, shelve the files use "p4 shelve -c changelistA"
  2. Change perforce config to branchB, create a new changelist "changelistB"
  3. In Brunch B, unshelve the changes use "p4 unshelve -s changelistA -c changelistB -b branchB"

But it throws the error "No such file(s)." How to solve this issue?

2 个答案:

答案 0 :(得分:1)

您必须运行以下命令:

  
      
  1. p4取消搁置-s change_list_number -b your_destination_branch
  2.   
  3. p4 resolve ...
  4.   

第一个带来了变化,第二个解决了任何冲突

答案 1 :(得分:0)

是的,几个版本之前(2014.1?)引入了脱离另一个分支的能力。从搁置的更改列表中,选择 Unshelve ,然后选择 Map unshelved files 选项(使用Branch Mapping)。当然,这假设您已设置了分支映射规范。