Search code examples
clearcasecleartool

How to annotate a folder in cleartool


I am trying to annotate a folder with command cleartool annotate folderName getting error

cleartool: Error: Unable to create file "test_tut_element_vob.ann": Permission denied.

I am able to annotate the files.


Solution

  • The cleartool annotate man page mentions the following caveat:

    The annotate command extracts information from the element's versions.
    To do so, it invokes the annotate method of the element's type manager.

    Only the text_file_delta and z_text_file_delta type managers (which correspond to the predefined element types text_file and compressed_text_file) include an annotate method.
    You must use the -ndata option when annotating versions of other element types.

    So check the type manager associated with test_tut_element_vob.ann.

    if "-ndata" does not work, depending on the nature of the content of test_tut_element_vob.ann, you can change its type. See this answer for compressed_file.


    it is my vob name and i am trying to annotate the whole vob

    cleartool annotate lists the contents of a version, annotating each line to indicate when, and in which version, the line was added.
    This is to be used on a file element, not on a vob.

    If the goal is to annotate all files within a vob, then you need a view and you can find all files, in order to use annotate:

    Unix:

    cd /path/to/view/vobs/test_tut_element_vob.ann
    cleartool find . -type f -exec 'cleartool annotate "$CLEARCASE_PN"'
    

    Windows:

    cd c:\path\to\view\test_tut_element_vob.ann
    cleartool find . -type f -exec "cleartool annotate \"%CLEARCASE_PN%\""