Is there a command in Cleartool which i can use to list all files which have been removed from a branch?
Thanks
Is there a command in Cleartool which i can use to list all files which have been removed from a branch?
Thanks
The basic command to find anything in ClearCase is... cleartool find
, also illustrated in "ClearCase UCM: Need to See Content of Deleted File".
In your case, you would search for versions of files which aren't at the LATEST of a branch:
cleartool find . -type f -version "! version(.../BRANCH/LATEST)" -print
(see version selector for more on this '.../
' notation)
To display only the file (and not all the versions):
cleartool find . -type f -element "! version(.../BRANCH/LATEST)" -print
The OP linuxlewis mentions in the comments:
this will show all differences which exist between sibling branches. I just want to be able see the file names,if any were removed,from the current branch
I mention the possibility of a grep
for BRANCH
, to detect files which have versions in BRANCH
but not LATEST
)
However, a cleaner solution is to add another filter to the search: && version(.../BRANCH)
cleartool find . -type f -element "! version(.../BRANCH/LATEST) && version(.../BRANCH)" -print
That will search all "elements" (files or directories in ClearCase) which have versions in branch BRANCH
, but not one in BRANCH/LATEST
.
BRANCH
(if it has version in BRANCH
but not LATEST
), it is a file for you. Or you can add a '&& version(.../BRANCH)
which should select all elements with versions in BRANCH
without a version in BRANCH/LATEST
. –
Corkhill -
' from –print
to -print
: '–
' is not the same as '-
'... –
Corkhill .../mybranch/LATEST
–
Corkhill © 2022 - 2024 — McMap. All rights reserved.