use of org.gluu.oxtrust.model.SubversionFile in project oxTrust by GluuFederation.
the class SubversionService method getDifferentFiles.
public List<SubversionFile> getDifferentFiles(List<SubversionFile> files) throws IOException {
String inumFN = StringHelper.removePunctuation(appConfiguration.getApplianceInum());
String applianceSvnHomePath = String.format("%s/%s", baseSvnDir, inumFN);
File dir = new File(applianceSvnHomePath);
log.debug("Copying files to temporary repository folder");
String dirFn = dir.getAbsolutePath();
List<SubversionFile> differentFiles = new ArrayList<SubversionFile>();
for (SubversionFile subversionFile : files) {
String fn = getLocalRepositoryFilePath(dirFn, subversionFile);
File f = new File(fn);
File persistedFile = new File(subversionFile.getLocalFile());
if ((!f.exists()) || FileUtils.checksumCRC32(persistedFile) != FileUtils.checksumCRC32(f)) {
differentFiles.add(subversionFile);
}
}
return differentFiles;
}
Aggregations