Skip to content
Permalink
Browse files

Changing from regexp to keyword/token based parsing of CVS rlog output

[FIXED JENKINS-14163] Prevent hanging of polling whilst parsing rlog contents
[FIXED JENKINS-14293] Handle files with additional parameters in rlog output
  • Loading branch information
mc1arke committed Sep 3, 2012
1 parent 2a8eaa1 commit da501e9c5984e7e8b48bbf28cb22a36888e45dcc
@@ -503,11 +503,11 @@ protected PollingResult compareRemoteRevisionWith(final AbstractProject<?, ?> pr
for (final CvsRepositoryItem item : repository.getRepositoryItems()) {
for (final CvsModule module : item.getModules()) {

CvsLog logContents = getRemoteLogForModule(repository, module, startTime, endTime, envVars, listener);
CvsLog logContents = getRemoteLogForModule(repository, item, module, startTime, endTime, envVars, listener);

// use the parser to build up a list of changed files and add it to
// the list we've been creating
files.addAll(logContents.mapCvsLog(repository, item, module, envVars).getFiles());
files.addAll(logContents.mapCvsLog(envVars.expand(repository.getCvsRoot()), item.getLocation()).getFiles());

}
}
@@ -532,7 +532,7 @@ protected PollingResult compareRemoteRevisionWith(final AbstractProject<?, ?> pr
* @throws IOException
* on underlying communication failure
*/
private CvsLog getRemoteLogForModule(final CvsRepository repository, final CvsModule module,
private CvsLog getRemoteLogForModule(final CvsRepository repository, final CvsRepositoryItem item, final CvsModule module,
final Date startTime, final Date endTime,
final EnvVars envVars, final TaskListener listener) throws IOException {
final Client cvsClient = getCvsClient(repository, envVars, listener);
@@ -634,18 +634,18 @@ public void dispose() {
protected List<CVSChangeLogSet.CVSChangeLog> calculateChangeLog(final Date startTime, final Date endTime,
final CvsRepository repository,
final TaskListener listener, final EnvVars envVars)
throws IOException, InterruptedException {
throws IOException, InterruptedException {

final List<CVSChangeLogSet.CVSChangeLog> changes = new ArrayList<CVSChangeLogSet.CVSChangeLog>();

for (final CvsRepositoryItem item : repository.getRepositoryItems()) {
for (final CvsModule module : item.getModules()) {

CvsLog logContents = getRemoteLogForModule(repository, module, startTime, endTime, envVars, listener);
CvsLog logContents = getRemoteLogForModule(repository, item, module, startTime, endTime, envVars, listener);

// use the parser to build up a list of changes and add it to the
// list we've been creating
changes.addAll(logContents.mapCvsLog(repository, item, module, envVars).getChanges());
changes.addAll(logContents.mapCvsLog(envVars.expand(repository.getCvsRoot()), item.getLocation()).getChanges());
}
}
return changes;
@@ -548,8 +548,12 @@ public boolean isDead() {
return dead;
}

public void setDead(boolean dead) {
this.dead = dead;
}

public void setDead() {
dead = true;
setDead(dead);
}

@Override

0 comments on commit da501e9

Please sign in to comment.
You can’t perform that action at this time.