Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create a patch using a set of changelists?

Tags:

perforce

Problem: 2 projects shared trunk and were updating some of the same files. Now one project needs to be released, so a new branch was created from a checkpoint before the projects started.

I have a list of just my changelist numbers from the mainline. Using that I can generate a list changed files and diff output using a script with a series of 'p4 describe #' commands.

Can I reformat that output and apply it to the new branch somehow?

like image 456
webXL Avatar asked Apr 21 '10 21:04

webXL


People also ask

How to Create patch file intellij?

Locate the commit that you want to create a patch from in the Log tab of the Version Control tool window Alt+9 and select Create Patch from the context menu. In the Patch File Settings dialog, modify the default patch file location if necessary, and click OK.

How do I create a patch in Webstorm?

In the Local Changes view, select the file or the changelist based on which you want to create a patch, and choose Create Patch from Local Changes from the context menu. You can also select the changes for commit, click the arrow next to the Commit button and select Create Patch.


1 Answers

Response to the title: "Is it possible to create a patch using a set of changelists?" Yes.

p4 diff2 -u //path_to_your_sources/...@cln_minus_1 //path_to_your_sources/...@cln > /tmp/cln.patch.

You can then use /tmp/cln.patch as input to the patch utility. Here, 'cln' is the submitted change list number that you want to create a patch for.

like image 74
Chaitanya Avatar answered Oct 05 '22 23:10

Chaitanya