1

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.

Akshay jain
  • 555
  • 1
  • 7
  • 22

1 Answers1

0

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%\""
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • i am using the -nData and getting this error stated in question. – Akshay jain Jul 31 '15 at 07:14
  • @akshayjain why -nData? why not -ndata? (just in case it is case sensitive) – VonC Jul 31 '15 at 07:15
  • @akshayjain check the properties of your file (not of your version of the file, of the file element itself): http://www-01.ibm.com/support/docview.wss?uid=swg21146356 – VonC Jul 31 '15 at 07:22
  • In type manager tab use type manager`s merge method is selected. – Akshay jain Jul 31 '15 at 07:38
  • @akshayjain what do you see in the Supertype field of that same "type manager" tab? – VonC Jul 31 '15 at 07:40
  • i am seeing the type manager of file file_system_object and it has nothing in Supertype field it is non editable and some other files have file_system_object in that field. – Akshay jain Jul 31 '15 at 08:27
  • @akshayjain As in http://www-01.ibm.com/support/docview.wss?uid=swg21146566, what is the output of `cleartool describe test_tut_element_vob.ann`? If `test_tut_element_vob.ann` is a text file, can you change its type to `text_file` (`cleartool chtype text_file test_tut_element_vob.ann`), and try `annotate` then? – VonC Jul 31 '15 at 08:51
  • 'cleartool: Error: Unable to access "test_tut_element_vob.ann": No such file or directory.' on the command _'cleartool describe test_tut_element_vob.ann'_ – Akshay jain Jul 31 '15 at 10:22
  • @akshayjain are you executing that command in the folder where `test_tut_element_vob.ann` is? – VonC Jul 31 '15 at 10:24
  • this file does not created because whlie annotating this folder named test_tut_element_vob with the command **cleartool -ndata folder name** giving me error.Is it possible to annotate the whole folder in cleratool?? – Akshay jain Jul 31 '15 at 10:25
  • @akshayjain I don't understand: cleartool annotate is for file already in source control, not for private generated files. Is `test_tut_element_vob.ann` a file already added to source control in ClearCase or not? – VonC Jul 31 '15 at 10:26
  • it is my vob name and i am trying to annotate the whole vob – Akshay jain Jul 31 '15 at 10:29
  • @akshayjain What? No! `cleartool annotate` is to be used on a file. To used it on a vob content, see my edited answer. – VonC Jul 31 '15 at 10:38