FilePath sandboxPath = VcsUtil.getFilePath(sandbox.sandboxPath);
FilePath sandboxFolder = sandboxPath.getParentPath();
assert sandboxFolder != null : "sandbox parent folder can not be null";
assert filePath.getPath().startsWith(sandboxFolder.getPath()) :
"" + filePath.getPath() + " should start with " + sandboxFolder.getPath();
final AbstractViewSandboxCommand command =
new AbstractViewSandboxCommand(new ArrayList<VcsException>(), vcs, sandbox.sandboxPath
, "--filter=file:" + MksVcs.getRelativePath(filePath, sandboxFolder)
// "--fields=workingrev",
// "--recurse"
) {
@Override
protected MksMemberState createState(String workingRev, String memberRev, String workingCpid,
String locker, String lockedSandbox, String type,
String deferred) throws VcsException {
return new MksMemberState((MksRevisionNumber.createRevision(workingRev)),
(MksRevisionNumber.createRevision(memberRev)), workingCpid,
MksMemberState.Status.UNKNOWN);
}
/*
@Override
public void execute() {
try {
super.executeCommand();
BufferedReader reader = new BufferedReader(new StringReader(commandOutput));
String line ;
while ((line = reader.readLine()) != null && !"".equals(line)) {
if (currentRevisionHolder[0] == null) {
currentRevisionHolder[0] = line;
} else {
LOGGER.warn("multiple members retrieved for "+filePath+"!!");
}
}
} catch (IOException e) {
LOGGER.error("error obtaining current revision for " + filePath, e);
}
}
*/
};
command.execute();
MksMemberState state = command.getMemberStates().get(filePath.getPath());
if (state == null) {
for (String s : command.getMemberStates().keySet()) {
if (VcsUtil.getFilePath(s).getPath().equals(filePath.getPath())) {
state = command.getMemberStates().get(s);
break;
}
}
}
if (state == null) {