Search code examples
clearcasecleartool

Cleartool - find unloaded/removed files


Is there a command in Cleartool which i can use to list all files which have been removed from a branch?

Thanks


Solution

  • 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.