user3003466
user3003466

Reputation: 323

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

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?

Upvotes: 1

Views: 6506

Answers (2)

rkachach
rkachach

Reputation: 17345

You have to run the following commands:

  1. p4 unshelve -s change_list_number -b your_destination_branch
  2. p4 resolve ...

The first one bring the changes and the second one resolved any conflict

Upvotes: 2

tkosinski
tkosinski

Reputation: 1696

Yes, a couple of releases ago (2014.1?) the ability to unshelve to another branch was introduced. From the shelved changelist, select Unshelve then select the Map unshelved files option (using Branch Mapping). Of course, this assumes you have a Branch Mapping spec set up.

Upvotes: 0

Related Questions