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 Linux diff
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`'