@Nullable String lastVcsRevisionKey) throws RepositoryException {
String lastCsetBuilt = lastVcsRevisionKey == null ? "-1" : lastVcsRevisionKey;
log.debug("collectChanges: last vcs key built: " + lastCsetBuilt);
IChangesProvider changesProvider = ChangesProviderFactory.get().getChangesProvider(repositoryData);
List<Commit> newerCommits = new ArrayList<Commit>();
String lastCsetOnRep = changesProvider.getChangesSinceLastBuilt(lastCsetBuilt, newerCommits);
log.debug(String.format(
"collectChanges: last changeset on rep:%s, number of commits:%s",
lastCsetBuilt,
newerCommits.size()));
return new BuildRepositoryChangesImpl(lastCsetOnRep, newerCommits);