if (isContinuation) {
LOGGER.info(ImporterMessages.EvolizerSVNImporter_startingUpdate);
fMonitor.subTask(ImporterMessages.EvolizerSVNImporter_startingUpdate);
fBeginImport = fModelMapper.getLastRevisionNum();
if (fBeginImport == -1) {
throw new SVNImporterException(ImporterMessages.EvolizerSVNImporter_noHistoryYet);
}
if (fConnector.getLatestRevision() == fBeginImport) {
throw new SVNImporterException(ImporterMessages.EvolizerSVNImporter_historyUpToDate);
}
fModelMapper.restoreContents(fTags);
} else {
LOGGER.info(ImporterMessages.EvolizerSVNImporter_startingImport);
fMonitor.subTask(ImporterMessages.EvolizerSVNImporter_startingImport);
}
// Now I create the representation
// I try to import the history and save into an instance of a Version Control model
try {
createRepresentation(isContinuation);
} catch (SVNException e) {
// If it fails, if it was due to some common network problems, I try to resume the import for as many times
// as the user requested
if (e.getMessage().contains(ImporterMessages.EvolizerSVNImporter_svnReset)
|| e.getMessage().contains(ImporterMessages.EvolizerSVNImporter_svnTimeOut)
|| e.getMessage().contains(ImporterMessages.EvolizerSVNImporter_svnWaiting)
&& fFailureCount <= fMaxFailures) {
while (++fFailureCount <= fMaxFailures) {
LOGGER.error(NLS.bind(ImporterMessages.EvolizerSVNImporter_importError, fCurrRev, fSVNBaseURL)
+ NLS.bind(ImporterMessages.EvolizerSVNImporter_resuming, fFailureCount, fMaxFailures) + e);
try {
this.resumeImport();
break;
} catch (SVNException e2) {
if (e2.getMessage().contains(ImporterMessages.EvolizerSVNImporter_svnReset)
|| e2.getMessage().contains(ImporterMessages.EvolizerSVNImporter_svnTimeOut)
|| e2.getMessage().contains(ImporterMessages.EvolizerSVNImporter_svnWaiting)) {
if (fFailureCount + 1 > fMaxFailures) {
LOGGER.error(NLS.bind(
ImporterMessages.EvolizerSVNImporter_importError,
fCurrRev,
fSVNBaseURL)
+ ImporterMessages.EvolizerSVNImporter_stopImport, e2);
throw new SVNImporterException(NLS.bind(
ImporterMessages.EvolizerSVNImporter_networkProbs,
fSVNBaseURL,
fCurrRev), e2);
}
} else {
throw e2;
}
}
}
} else {
throw new SVNImporterException(NLS.bind(
ImporterMessages.EvolizerSVNImporter_networkProbs,
fSVNBaseURL,
fCurrRev), e);
}