/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
* Access to a ClearCase repository.
*
*/
/** The property name used to obtain the client command for this repository. */
"org.opensolaris.opengrok.history.ClearCase";
/** The command to use to access the repository if none was given explicitly */
private boolean verbose;
public ClearCaseRepository() {
type = "ClearCase";
datePattern = "yyyyMMdd.HHmmss";
}
/**
* Use verbose log messages, or just the summary
* @return true if verbose log messages are used for this repository
*/
public boolean isVerbose() {
return verbose;
}
/**
* Specify if verbose log messages or just the summary should be used
* @param verbose set to true if verbose messages should be used
*/
}
/**
* Get an executor to be used for retrieving the history log for the
* named file.
*
* @param file The file to retrieve history for
* @return An Executor ready to be started
*/
}
if (file.isDirectory()) {
}
}
{
try {
// cleartool can't get to a previously existing file
"Failed to remove temporary file used by history cache");
}
return null;
}
public void close() throws IOException {
super.close();
// delete the temporary file on close
// failed, lets do the next best thing then ..
// delete it on JVM exit
tmp.deleteOnExit();
}
}
};
} finally {
// Clean up zombie-processes...
try {
} catch (IllegalThreadStateException exp) {
// the process is still running??? just kill it..
}
}
}
return ret;
}
/**
* Drain all data from a stream and close it.
* @param in the stream to drain
* @throws IOException if an I/O error occurs
*/
while (true) {
long skipped = 0;
try {
} catch (IOException ioe) {
// ignored - stream isn't seekable, but skipped variable still
// has correct value.
"Stream not seekable", ioe);
}
// No bytes skipped, checked that we've reached EOF with read()
break;
}
}
}
/**
*
* @param file file to annotate
* @param revision revision to annotate
* @return file annotation
*/
}
try {
int lineno = 0;
++lineno;
}
return a;
} finally {
try {
} catch (IllegalThreadStateException e) {
}
}
}
}
return true;
}
do {
try {
} catch (InterruptedException exp) {
}
} while (true);
}
@SuppressWarnings("PMD.EmptyWhileStmt")
try {
// Check if this is a snapshot view
boolean snapshot = false;
}
return;
}
if (snapshot) {
// It is a snapshot view, we need to update it manually
// consume output
// do nothing
}
return;
}
}
} finally {
try {
} catch (IllegalThreadStateException e) {
}
}
}
}
// Todo: is there a cheap test for whether ClearCase has history
// available for a file?
// Otherwise, this is harmless, since ClearCase's commands will just
// print nothing if there is no history.
return true;
}
public boolean isWorking() {
}
return working.booleanValue();
}
// if the parent contains a file named "view.dat" or
// the parent is named "vobs" or the canonical path
// is found in "cleartool lsvob -s"
if (f.exists()) {
return true;
return true;
} else if (isWorking()) {
try {
return true;
}
}
} catch (IOException e) {
}
}
return false;
}
private static class VobsHolder {
}
return VobsHolder.vobs;
}
new ClearCaseRepository();
int rc;
"\"cleartool lsvob -s\" output was null");
return new String[0];
}
return vobs;
}
"\"cleartool lsvob -s\" returned non-zero status: " + rc);
}
return new String[0];
}
boolean hasHistoryForDirectories() {
return true;
}
}
}