1

I am trying to label all the elements within a branch of a view, but some of the elements do not get labeled and instead give me a "No such file or Directory" error. I can see the files that generated the error in my command window, but they are highlighted in red. It seems like these files are not there and are thus generating the error. How can I remove these "files" from the view so that the labeling can continue and not generate errors?

Say that bolded words represent red highlighting. This is what I see:

file1 file2 directory1 directory2

Here is how my code is structured in my shell script:

cleartool mkview -tag $VIEWNAME ... (etc.)
cleartool setcs -tag $VIEWNAME configSpec.txt

cd /projectDirectory

labelname=`date "+%b-%d-%y"`
cleartool mklbtype -nc $labelname

cleartool mklabel -recurse $labelname /projectDirectory

The script starts recursing through the file tree from the projectDirectory. When it encounters file1 or directory1, I get the "No such file or directory" error. Otherwise, for file2 and directory2, the labeling occurs properly.

So, my question is this: How can I use the mklabel command or some other method to label all the files that are not highlighted in red?

rafafan2010
  • 1,559
  • 2
  • 14
  • 23

1 Answers1

0

You must first know the exact status of the "files in red"

For that, go in a shell to their parent folder, and type:

cleartool ls

That will give you their status (eclipsed?, private? other?), which will explain why the label cannot proceed.

Possible causes:


Note: if an element isn't selected (no version selected and Rule: -none), then a recurse mklabel is supposed to generate that error message, but that won't prevent the label to be set on the other elements version.
So that error message should be safely ignored.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I've used `-none` rules to exclude those folders. That's why they have no version selected. The problem is that `mklabel` tries to label those folders even though I haven't selected them with my rules. – rafafan2010 Jun 19 '14 at 18:52
  • @rafafan2010 does a `cleartool ls` confirm that those folders are actually not selected? (version '`none`') – VonC Jun 19 '14 at 18:54
  • @rafafan2010 and what OS, and version of ClearCase are you using? – VonC Jun 19 '14 at 18:55
  • I'm using version 7.1.2.4 on Linux. `ct ls` says `[no version selected]` next to the name of the element and `Rule: -none` at the end of the line. – rafafan2010 Jun 19 '14 at 18:59
  • @rafafan2010 then it is an expected error that you can ignore, considering all other elements are properly labelled. – VonC Jun 19 '14 at 19:01