in src/net/sourceforge/transparent/CommandLineClearCase.java [220:249]
private Status parseLine(@NotNull String output, final boolean wasSuccessful) {
// Check message "Pathname is not withing a VOB:..." first because it comes
// along with Failure exit code for cleartool command, and we may return
// with ClearCaseException without giving useful information.
if( output.indexOf( NOT_VOB_ELEMENT ) != -1 )
return Status.NOT_AN_ELEMENT;
// Check message "Unable to access...No such file or directory" first
// because it comes along with Failure exit code for cleartool command,
// and we may return with ClearCaseException without giving useful information.
// NB: I found this message only appearing when working with dynamic views,
// potential failure in synching VirtualFile via VFS?
if( output.indexOf( UNABLE_TO_ACCESS ) != -1 && output.indexOf( NO_SUCH_FILE_OR_DIR ) != -1 )
return Status.NOT_AN_ELEMENT;
if (! wasSuccessful)
throw new ClearCaseException(output);
if( output.indexOf( VERSIONED_SIG ) == -1 )
return Status.NOT_AN_ELEMENT;
if( output.indexOf( HIJACKED_SIG ) != -1 )
return Status.HIJACKED;
if( output.indexOf( CHECKEDOUT_SIG ) != -1 ||
output.indexOf( CHECKEDOUT_REMOVED_SIG ) != -1 )
return Status.CHECKED_OUT;
else
return Status.CHECKED_IN;
}