15

I have workspace1 that has some shelved changes. Now I need that shelf to be moved to workspace2. I am trying the following command with no luck. you can see the error I am getting as well.

C:\source\workspace1>p4 -c workspace1 unshelve -s changelistworkspace1# [-f] [-n] [-c changelistworkspace2#] [-S workspace2Stream]

The errors:

[-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.

I am quite new to perforce so excuse me if this an easy task that I am having issues with. The resource i am using to guide me is:

http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_unshelve.html

I have also goggled with no luck. I also found a resource that said there was an option in the unshelve dialog of P4V however i do not have that option.

Aaron
  • 1,361
  • 1
  • 13
  • 30
  • To start with, you don't actually specify the square brackets. Those are in the syntax diagrams to indicate optional parameters. So for example, don't specify '[-n]', just specify '-n'. That probably isn't your real problem, but it will at least get us a better error message to help us understand what you're trying to do. – Bryan Pendleton Jun 26 '14 at 00:51

3 Answers3

14

Thanks for the help everyone. The issue was that since the files were in two different streams instead of unshelve I needed to change ownership for the changelist to the new workspace. Now I can unshelve without any issues.

To change ownership I right clicked the the changelist in P4V and selected change ownership.

Aaron
  • 1,361
  • 1
  • 13
  • 30
9

If both workspaces are of same user, or relevent permission are given for the change list:

Go to your initial workspace [client1]

p4 shelve -c <changelist_x>

Go to your second workspace [client2]

p4 unshelve -s <changelist_x>
ANjaNA
  • 1,404
  • 2
  • 16
  • 29
Chand Priyankara
  • 6,739
  • 2
  • 40
  • 63
3

You must specify a changelist in your destination workspace for the shelved files to be moved to.

EXAMPLE - The 'admin' user has some shelved files in change 12118

$ p4 changes -s shelved -u admin
Change 12118 on 2014/06/25 by admin@admin14streams *pending* 'original shelve changes by admi'

Another user creates a changelist with a description and removes those shelved files into their changelist.

$ 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

In P4V, to unshelve changes from another user:

  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'

REFERENCES

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

P4Shimada
  • 758
  • 4
  • 8