Skip to content

Commit

Permalink
[JENKINS-15089] Loading stream
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgarnet committed Sep 10, 2012
1 parent 98a3710 commit 0415727
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/main/java/net/praqma/hudson/scm/CCUCMScm.java
Expand Up @@ -584,6 +584,13 @@ private boolean pollStream( FilePath workspace, AbstractProject<?, ?> project, S

printParameters( out );
state.setStream( Stream.get( stream ) );
/* The Stream must be loaded */
try {
state.setStream( (Stream) rutil.loadEntity( workspace, state.getStream(), getSlavePolling() ) );
} catch( CCUCMException e1 ) {
ExceptionUtils.print( e1, out, true );
throw new AbortException( "Unable to load " + state.getStream() );
}

if( !state.isAddedByPoller() ) {
logger.debug( "This job was not added by a poller" );
Expand All @@ -597,7 +604,7 @@ private boolean pollStream( FilePath workspace, AbstractProject<?, ?> project, S
baselines = getBaselinesFromStreams( workspace, listener, out, state, state.getStream(), state.getComponent(), polling.isPollingChilds() );
}

filterBaselines( project,state.getStream(), baselines );
filterBaselines( project, state.getStream(), baselines );

/* if we did not find any baselines we should return false */
if( baselines.size() < 1 ) {
Expand Down Expand Up @@ -944,9 +951,17 @@ public boolean accept( File file, String name ) {
logger.debug( "Need for polling" );

storeStateParameters( state );

PrintStream out = listener.getLogger();
printParameters( out );

/* The Stream must be loaded */
try {
state.setStream( (Stream) rutil.loadEntity( workspace, state.getStream(), getSlavePolling() ) );
} catch( CCUCMException e1 ) {
ExceptionUtils.print( e1, out, true );
throw new AbortException( "Unable to load " + state.getStream() );
}

out.println( "[" + Config.nameShort + "] polling streams: " + polling );

Expand Down Expand Up @@ -1225,10 +1240,6 @@ private void storeStateParameters( State state ) {
state.setRecommend( recommend );
state.setForceDeliver( forceDeliver );

/*
* try { state.setBaseline( UCMEntity.getBaseline( bl, false ) ); }
* catch( UCMException e ) { logger.warning( e ); }
*/
state.setPlevel( plevel );
}

Expand Down

0 comments on commit 0415727

Please sign in to comment.