Cleartool annotate command giving error - Not an object in a vob:"java file"

1.8k views Asked by At

I am new to clearcase and I am trying to generate a blame file using annotate command, but I am getting the following error :

cleartool: Error: Not an object in a vob: "App.java"

I followed these steps :

  1. Created a view in clearcase explorer
  2. Browsed to the location (C:\test_view)
  3. Ran: cleartool annotate App.java

This resulted in the following -

cleartool: Error: Not an object in a vob: "App.java".

2

There are 2 answers

0
Saurabh Juneja On BEST ANSWER

Please create VOBs through create VOB program.

Then create dynamic view using clearcase explorer.

Mount the VOBs on the dynamic view.

Once mounted, in the view explorer, right click and add text file.

rt-click text file to add to source and then checkin the file after making the necessary changes.

from command prompt go to the VOB and run cleartool annotate

Z:>cd test_tut_element_vob

Z:\test_tut_element_vob>cleartool annotate TestFile.txt Annotated result written to "TestFile.txt.ann".enter image description here

15
VonC On

You cannot execute cleartool commands on elements (versioned files or folder) directly in a snapshot root folder like c:\test_View.

You need to edit its config spec:

cd c:\test_View
cleartool edcs

Add selection rules (like at least element * /main/LATEST, unless this is an UCM view, in which case selection rules are already there), and load rules in order to load at least the content of a Vob.

Then you can go within the vob and do some cleartool annotate.

cd c:\test_view\avob
cleartool annotate afile

Note: if your file App.java is not yet versioned, you would need to add it to source control (in any folder in c:\test_view\avob), with cleartool mkelem, or, for multiple files, clearfsimport.