Jump to content

Feature request - create patch from changelist

feature request patch

  • Please log in to reply
2 replies to this topic

#1 JGurto



  • Members
  • Pip
  • 1 posts

Posted 19 June 2018 - 01:44 AM


Not sure where to submit feedback/feature requests.
I'd really like a convenient "create patch" button in P4V, either on one changelist or a range of changelists.
Sometimes I have to move bits of code between different SCMs, so the lack of features for exporting code from P4 is a bit annoying.


#2 p4rfong


    Advanced Member

  • Staff Moderators
  • 343 posts

Posted 22 June 2018 - 01:30 AM

The information of what changed in each changelist is available from, for example, "p4 describe #change". This command will first return the list of files changed, followed by the individual changes in a patch - or
patch-like - format.  If this does not work, try the "p4 diff2 -u" command to create a patch.

Once you can create a patch from the command line, you can add a new menu item in P4V as a "Custom Tool".  The custom tools are available from the menu bar in P4V under
"Tools > Manage Custom Tools ...". Create a new tool by checking New > Tool from the drop-down menu, and check the option box "Add to applicable context menus".
You probably want to pass the changelist as on of the arguments in the "Arguments" field (%C).

Once you have created your custom tool, you will find it in the context menu (right click) for the changelists. This should make it possible
to create a simple patch utility from P4V.

#3 chrisburel



  • Members
  • Pip
  • 1 posts

Posted 22 October 2018 - 06:34 PM

The p4 diff2 command output does not include the diff for files added to or removed from the depot for that change. For instance, if //depot/mybranch was created from a p4 populate command at revision 7, I would expect p4 diff2 -u //depot/mybranch/...@6 //depot/mybranch/...@7 to show all contents of all files in the branch. Instead, it shows nothing.

The result is that the patch generated by diff2 is incomplete. If I am working on a new feature that has code in new files, the code for the new feature is missing in the diff2 output. This is true for anything that shows diffs, including p4 describe, p4 diff, and p4 diff2.

Also tagged with one or more of these keywords: feature, request, patch

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users