Jump to content

Patching in p4v

patch patching p4v

  • Please log in to reply
2 replies to this topic

#1 tobias



  • Members
  • Pip
  • 2 posts

Posted 07 June 2013 - 02:02 PM

Hi There.

I can't seem to find a way to use p4v to create and apply patches. At the moment i use p4eclipse, but then I must have the files added to the workspace. This is cumbersome, error prone, and impossible if the patch contains a new project or files not currently in a project.

Does anybody know how to use p4v to create and apply patches based on a changelist?
Or even better: Is it possible to "copy"/"patch" a change changelist directly from the changelist number from one workspace to another?


#2 P4Matt


    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 10 June 2013 - 04:36 PM

P4V doesn't have a way to create a patch. From the command line you can run p4 diff2 -u to generate patch compatible output, but the changes have to be submitted already. Based on what you're describing I think the way I would generally handle this in Perforce is to shelve the pending changelist in one workspace and then unshelve it in the other. Here's a good blog post showing shelving in action:


#3 tobias



  • Members
  • Pip
  • 2 posts

Posted 11 June 2013 - 08:57 AM

Unshelving is just the thing. Thanks.

In p4v the procedure is.
  • Shelve CL 123 in workspace A:
    Right click on the CL 123 and select "Shelve"
  • Switch to workspace B
  • Show CL 123 In the Pending Changelist view, by changing the filter so "workspace=A", instead of "workspace=Current Workspace"
  • Find the CL and unshelve it.
    Right click on the CL and select "Unshelve"

Also tagged with one or more of these keywords: patch, patching, p4v

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users