Skip to content

Commit

Permalink
Changing from regexp to keyword/token based parsing of CVS rlog output
Browse files Browse the repository at this point in the history
[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 da501e9
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 237 deletions.
12 changes: 6 additions & 6 deletions src/main/java/hudson/scm/AbstractCvs.java
Expand Up @@ -503,11 +503,11 @@ protected List<CvsFile> calculateRepositoryState(final Date startTime, final Dat
for (final CvsRepositoryItem item : repository.getRepositoryItems()) { for (final CvsRepositoryItem item : repository.getRepositoryItems()) {
for (final CvsModule module : item.getModules()) { 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 // use the parser to build up a list of changed files and add it to
// the list we've been creating // 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());


} }
} }
Expand All @@ -532,7 +532,7 @@ protected List<CvsFile> calculateRepositoryState(final Date startTime, final Dat
* @throws IOException * @throws IOException
* on underlying communication failure * 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 Date startTime, final Date endTime,
final EnvVars envVars, final TaskListener listener) throws IOException { final EnvVars envVars, final TaskListener listener) throws IOException {
final Client cvsClient = getCvsClient(repository, envVars, listener); final Client cvsClient = getCvsClient(repository, envVars, listener);
Expand Down Expand Up @@ -634,18 +634,18 @@ public void dispose() {
protected List<CVSChangeLogSet.CVSChangeLog> calculateChangeLog(final Date startTime, final Date endTime, protected List<CVSChangeLogSet.CVSChangeLog> calculateChangeLog(final Date startTime, final Date endTime,
final CvsRepository repository, final CvsRepository repository,
final TaskListener listener, final EnvVars envVars) final TaskListener listener, final EnvVars envVars)
throws IOException, InterruptedException { throws IOException, InterruptedException {


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


for (final CvsRepositoryItem item : repository.getRepositoryItems()) { for (final CvsRepositoryItem item : repository.getRepositoryItems()) {
for (final CvsModule module : item.getModules()) { 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 // use the parser to build up a list of changes and add it to the
// list we've been creating // 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; return changes;
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/hudson/scm/CVSChangeLogSet.java
Expand Up @@ -548,8 +548,12 @@ public boolean isDead() {
return dead; return dead;
} }


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

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


@Override @Override
Expand Down

0 comments on commit da501e9

Please sign in to comment.