How to unshelve a shelved changelist to another branch prior to Perforce 2013?

Yair Nevet picture Yair Nevet · Jan 6, 2014 · Viewed 34.3k times · Source

Using Perforce Server 2012.2/538478, how can I unshelve files from the trunk to another branch?

When trying to do it, I get:

//filename... (not mapped to your workspace view)

In Perforce 2013, I found this unshelve command to really be helpful:

p4 unshelve -s <changlist#-with-shelved-files> -S //depot/streamname

But with the version I'm using currently, I found nothing to help me with that issue.

Any suggestions?

Answer

ninesided picture ninesided · Jan 6, 2014

You're looking at the right command, but possibly not the right parameters. This is how I use it:

p4 unshelve -s 77655 -b MY_BRANCH_SPEC

which unshelves changelist 77655, using the specified branch specification to map the files to the new branch.

Critically, you need to make sure that both the specified branch mapping and your current workspace mapping contain both the source and destination files, otherwise you will get the "file not mapped" error.