Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClearCase: how to generate a patch (unified diff) file from an activity?

Is it possible to generate an patch file from the changeset of a UCM Activity in ClearCase?

I can generate the list of changes this way: cleartool lsactivity -l activity:my_activity_name

like image 442
neves Avatar asked Dec 10 '25 10:12

neves


2 Answers

The main approach is list all the files within an activity, and use cleartool diff -pred -diff_format in order to generate a diff.

With the -diff_format option, you would get headers and differences in the same style as the UNIX and Linux diff utility.

But that would require some scripting, as I mentioned in "Change set predecessor using cleartool".

like image 173
VonC Avatar answered Dec 13 '25 06:12

VonC


I didn't have much luck with cleartool diff -pred -diff_format. It worked but left a bit to be desired so I fashioned this instead:

diff --unified <file>@@/main/`cleartool pwv -short`/0 <file> >> patch

This allows you to stack multiple files together and apply them all at once. You can use the resulting file with either patch or git apply

like image 34
Justin Wrobel Avatar answered Dec 13 '25 04:12

Justin Wrobel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!