throws HistoryException {
final File dir = file.isDirectory() ? file : file.getParentFile();
final Repository repo = getRepository(dir);
History history = null;
RemoteSCM rscm = RuntimeEnvironment.getInstance().getRemoteScmSupported();
boolean doRemote = (ui && (rscm == RemoteSCM.UIONLY))
|| (rscm == RemoteSCM.ON)
|| (ui || ((rscm == RemoteSCM.DIRBASED) && (repo != null) && repo.hasHistoryForDirectories()));
if (repo != null && repo.isWorking() && repo.fileHasHistory(file)