How to prevent an error message when HCO encounters an invalid view path?

Document ID : KB000049895
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Automated build scripts executing the hco checkout command-line utility fail with the error "E03020151: Invalid view path" if the view path specified is invalid. There is a switch (-nvf) to produce errors when a file or item is not found, and only a warning when the switch is not used, but how can we prevent errors when the view path is not found? This error prevents our build scripts from completing when a view path is invalid and there seems to be no way to turn it off.

Solution:

The optional -nvf switch on the hco command line specifies how CA SCM will handle "file not found" errors during hco execution.

When you specify -nvf, if one or more items (files) specified is missing or, if no items match a wildcard criteria, then CA SCM aborts the check out, displays an error message, and returns error code 14. If, on the other hand, you do not specify -nvf, CA SCM will display a warning message and continue the checkout returning Success upon completion.

To achieve the same behavior for invalid or missing view paths, you can use the recursive checkout option (-s).

When the recursive check out option is used and an invalid view path is encountered, you will receive a warning message instead of an error and the checkout will continue to completion.

Note that because an invalid view path was specified, no files will be checked out, but you will be able to complete an automated build without an error abort.

Here is an example hco command which will succeed even though an invalid view path (baddir) was specified:

C:\>hco -b halma12-vm17573 -en Starclient -st Development -vp
\Starclient\src\com\ca\starclient -p Pack1 -cp C:\Checkout -usr harvest -pw password -br -ced
-op pc -s "baddir\*.java"

In this example, the view path "baddir" does not exist, but you will not receive an error message because the "-s" recursive check out option was used.

This is what you will see in the hco.log output file:

C:\>type hco.log
I00060040: New connection with Broker halma12-vm17573 established.
W010a0074: Warning: No version found for filename or pattern: baddir\*.java
.
I000a0080: Check out summary: Total: 0; Success: 0; Failed: 0; Not
Processed: 0.