Reputation: 2608
I did some research on how to create a patch for a directory. For example, How to create a patch for a whole directory to update it?
But the first step is to ask you to create a separate directory that contains all your change.
But, since I made change under ClearCase, and I feel there should be a better to do this. Also, make a separate new directory can take huge chunk of storage space.
Any suggestions?
Upvotes: 1
Views: 882
Reputation: 1323573
If you want to make patches from the current work in progress (the files that are checked out in the current folder), you can use cleartool lsco
(or cleartool ls
) combined with cleartool diff
:
cd /path/to/my/view/myfolder
cleartool lsco -s -cview | xargs cleartool diff -pred -diff_format
# for all files:
cleartool ls -s -view-only | xargs cleartool diff -pred -diff_format
The
-diff_format
option causes both the headers and differences to be reported in the style of the UNIX and Linuxdiff
utility.
You can redirect the output to a file in order to get your patch.
Add -recurse
to cleartool ls
or cleartool lsco
, to get the files in subfolders.
If you know the branch you are in, you can do a diff with a different version than "-pred":
| xargs -0 -i sh -c '`cleartool diff {} {}@@/main/yourBranch/0`'
"xargs
: using same argument in multiple commands" proposes another syntax:
| xargs -n1 -I_afile -- sh -c '`cleartool diff _afile _afile@@/main/yourBranch/0`'
Upvotes: 1