Changing the Owner of a Pending Changelist

Transferring in progress work between users or clients.

TASK

How can I transfer my in progress changes to another user or client?


DETAILS

Transferring ownership of pending changelists might be needed for situations similar to the following:

  • A user needs to switch machines, and move their pending work from one machine to another.
  • A user needs to switch to a new Perforce account but has work in progress.
  • A user wants to transfer ownership of in progress work to another user.

Note: If you need to move work in progress to another branch, but don't need to change users, please see KB Article #55: Branching Work In Progress.

Perforce Server Versions 2009.1 and Later

With version 2009.1 and later, the Perforce server allows for shelving changes so that other users can access changed files without submitting them to Perforce. This makes "assigning," or otherwise relocating changed files a matter of shelving a pending change. The following command shelves the default changelist:

p4 shelve

If, for example, this command created shelved pending changelist number 1234, the files can be relocated to another workspace by entering the command:

p4 unshelve -s 1234

For in-depth information on using the shelve and unshelve commands, refer to the Perforce Command Reference, or please see the P4V Shelving Video.

Perforce Server Versions Prior to 2009.1

To transfer a pending changelist to another user:

  1. Find out what files are open in the pending changelist by using:
  2. p4 opened
    
  3. Outside of Perforce control, copy the opened files to a temporary location on the new machine, or to a location where the new user can access them.

  4. Revert the original file(s) using the old user account, or a super user account. Note which files were marked for deletion, and which files were being integrated. If this is too much trouble, you can submit just those files that were integrated/deleted and revert the rest.

  5. On the new machine, in the new user's workspace, create a new changelist; note that this is only necessary if the new user already has files opened in his/her workspace.
  6. p4 change
    

    Leave the default settings except for the description, which should be something informative, like "In-progress work from user <name>".

  7. Sync the files the old user was working on to the new user's workspace, and open them for edit.
    p4 sync //depot/file1 //depot/file2 //depot/file3 
    p4 edit file1 file2 file3
  8. Copy the old user's modified files to the new workspace, overwriting the files opened for edit.

  9. Check the files listed by step 3 and delete/add/integrate those files.

  10. If the new user has other opened files in that workspace, move the old user's modified files to the numbered changelist produced in step 4. This is done using:
    p4 reopen -c <numbered_changelist> //depot/file1 //depot/file2 
    
  11. If the new user has no other opened files, then you can submit the default changelist with the appropriate description. Otherwise, submit the numbered changelist you created in step 4:
    p4 submit -c <numbered_changelist>