I modified and checked-in a bunch of files under my branch. Now I need to get the list of files I modified. Is there any scripts to do so?
There is also a graphical way to find objects with a certain label called Report Builder (also known in ClearCase Explorer as Report Wizard). In Report Builder you can navigate to Elements/Labels which has the "Elements with Labels" and "Versions with Labels" reports.
If you are using Windows ClearCase 'Report Builder' can be used to find all elements with a given branch name, as well as the option to find the latest version number (explicit element).
You can try and delete the byrtpe (branch type) with cleartool rmtype brtype:xxx .
The cleartool command find
should help you find any element (file) with at least one version on a given branch.
The following will find all the files on a branch
cleartool find . -type f -branch "brtype(mybranch)" -print
See find examples or "Additional examples of the cleartool find command" for more examples.
The OP sarath adds:
it gives me a crippled file name with @ and other characters. Is it possible to get with normal path?
True, such a command would give you something like (as an example):
.\.checkstyle@@\main\MyBranch
.\.classpath@@\main\MyBranch_Int\MyBranch
.\.classycle@@\main\MyBranch_Int\MyBranch
.\.fbprefs@@\main\MyBranch_Int\MyBranch
To get only the path, you have two solutions:
1/ look for elements (and not versions) with the right branch:
cleartool find . -type f -ele "brtype(mybranch)" -print
(note the -ele
replacing the -branch
)
That would give:
.\.checkstyle@@
.\.classpath@@
.\.classycle@@
.\.fbprefs@@
.\.pmd@@
But you still have the "ugly" '@@
'.
2/ combine the find with an exec directive which describe the element found with fmt_ccase
format:
cleartool find . -type f -ele "brtype(mybranch)" -exec "cleartool descr -fmt \"%En\n\" \"%CLEARCASE_PN%\""
Multi-line form for readability:
cleartool find . -type f -ele "brtype(mybranch)" \
-exec "cleartool descr -fmt \"%En\n\" \"%CLEARCASE_PN%\""
Please note that all "inner" double quotes need to be escaped.
The %En
will give you the name of the element found.
.\.checkstyle
.\.classpath
.\.classycle
.\.fbprefs
.\.pmd
.\.project
.\.settings\dico.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With