4

I have a very strange error running the cleartool lsview command under UNIX (version 7.1.2.12).

The command works in general but for some users (!) it gives the following error message :

cleartool: Error: No matching entries found for view tag "user_*".

I encountered this error first in a Perl-script but it is reproducible on the command line as well. I try to do something like :

cleartool lsview user_\*

Where user is the user name. For most users (like myself) cleartool will list my views that start with my user name and are followed by an underscore.

For some other users the command will return a list with their views but in addition it will produce the error message mentioned above. My script obviously checks for ClearCase errors and stops working. If I left out the underscore (any underscores in the pattern!) the error message is gone.

Is there anything I need to be aware of when querying the views of a user? The IT told me to do :

cleartool lsview|grep "user_"

which would work without an error message but I want to understand why the error comes up.

Thanks for reading so far.

Amith
  • 6,818
  • 6
  • 34
  • 45
user2606240
  • 641
  • 1
  • 6
  • 20

1 Answers1

3

I always use a grep, but I just test in command line (on Windows). This works:

 cleartool lsview prefix_*

In other word, I never had to escape the '*'. This doesn't work:

 cleartool lsview prefix_\*
 cleartool: Error: Invalid view tag: "prefix_\*".

It can depend on how the shell will interpret the '*', as in this similar bug.

Under Unix, you might want to avoid a premature interpretation of the '*' (wildcard expansion) with double-quotes:

cleartool lsview "prefix_*"

The OP user2606240 reports in the comments:

As soon as the _ is in the view name I get the error message.
As far as I understood the registry and registered views that should not be the case.
I think I'll just implement the grep after lsview and live with it.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The \* was because of the bash interpreting the *. I also tried with the double quotes but still the error persists. The weird thing is that I get the list of views but the error message at the very end (for some users). So the message is bogus. – user2606240 Mar 17 '14 at 14:47
  • @user2606240 and with single-quotes? (just to check) – VonC Mar 17 '14 at 15:30
  • @user2606240 maybe you have some views for a user which are registered, but have no tag (or the opposite: which have a tag, but are not registered): http://stackoverflow.com/a/15501544/6309 – VonC Mar 17 '14 at 15:32
  • The same result with single quotes. As soon as the _ is in the view name I get the error message. As far as I understood the registry and registered views that should not be the case. I think I'll just implement the grep after lsview and live with it - unless our IT department comes up with a better solution. Thanks for the help! – user2606240 Mar 17 '14 at 15:41
  • @user2606240 Ok, I have included your conclusion in the answer for more visibility. – VonC Mar 17 '14 at 15:57