in vault-server/src/jetbrains/buildServer/buildTriggers/vcs/vault/VaultVcsSupport.java [237:267]
public IncludeRuleChangeCollector getChangeCollector(@NotNull final VcsRoot root,
@NotNull final String fromVersion,
@Nullable final String currentVersion) throws VcsException {
final VaultConnection connection = getOrCreateConnection(root);
return new IncludeRuleChangeCollector() {
@NotNull
public List<ModificationData> collectChanges(@NotNull final IncludeRule includeRule) throws VcsException {
final String targetPath = includeRule.getFrom();
connection.refresh();
if (connection.objectExists(targetPath, null)) {
final String toVersion = currentVersion == null ? connection.getFolderVersion(targetPath) : currentVersion;
if (fromVersion.equals(toVersion)) {
return Collections.emptyList();
}
return VaultUtil.groupChanges(root, new VaultChangeCollector(connection, fromVersion, toVersion, targetPath).collectChanges());
}
return Collections.emptyList();
}
public void dispose() {
// try to preserve caches for patch building
// connection.resetCaches();
}
};
}