/*
* 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. */
/** The command to use to access the repository if none was given explicitly */
private boolean verbose;
/**
* Create a new instance of type {@code ClearCase}.
*/
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 (canonical path incl. source
* root).
* @return An Executor ready to be started
*/
}
if (file.isDirectory()) {
}
}
/**
* {@inheritDoc}
*/
@SuppressWarnings("resource")
{
try {
// cleartool can't get to a previously existing file
}
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.
}
// No bytes skipped, checked that we've reached EOF with read()
break;
}
}
}
/**
* {@inheritDoc}
*/
}
try {
}
return a;
} finally {
try {
} catch (IllegalThreadStateException e) {
}
}
}
}
/**
* {@inheritDoc}
*/
return true;
}
do {
try {
} catch (InterruptedException exp) {
// ok
}
} while (true);
}
/**
* {@inheritDoc}
*/
@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) {
}
}
}
}
/**
* {@inheritDoc}
*/
// 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;
}
/**
* {@inheritDoc}
*/
public boolean isWorking() {
}
return working.booleanValue();
}
/**
* {@inheritDoc}
*/
// 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) {
+ "': " + e.getMessage());
}
}
return false;
}
private static class VobsHolder {
@SuppressWarnings("synthetic-access")
}
return VobsHolder.vobs;
}
int rc;
return new String[0];
}
return vobs;
}
}
return new String[0];
}
/**
* {@inheritDoc}
*/
public boolean hasHistoryForDirectories() {
return true;
}
/**
* {@inheritDoc}
*/
}
}