Search code examples
version-controlclearcase

Clearcase: how to not have garbage while working with hijacked files?


After a lot of experiments, my team concluded that working with hijacked files in a snapshot view is the most efficient way to use ClearCase version control. The problem is that after each update/merge operation it leaves a lot of garbage in the directory. These are files with extensions like .keep.9 or .contrib.16.

These garbage makes it difficult to see if some file is private and we have forgot to add it to the repository. Is it possible to automatically erase these files?

It looks like you can't configure some files to be ignored, a basic feature of every other version control system.


Solution

  • .keep.x files are generated by a cleartool update -keep.
    One solution would be to use a cleartool update -overwrite, which would not generate .keep.x files.

    .contrib.x are generate by cleartool merge. See "Explanation of .contrib files left for every version just delivered in UCM".

    The general idea though is to find and remove automatically all .keep.x and .contrib.x files after each update/merge, through a shell command.
    For instance in Windows:

    del /s *.contrib*
    # or
    for /R %i IN (*.contrib) do del %i
    

    Note that you have other temporary files you need to pay attention to: see About the temporary files created by ClearCase.