[ http://jira.codehaus.org/browse/SCM-163?page=comments#action_59327 ] 

Mike Perham commented on SCM-163:
---------------------------------

Thanks for tracking this down, John.  The code was written before the changelog 
command was well defined.

> PerforceUpdateCommand does not correctly return change list
> -----------------------------------------------------------
>
>          Key: SCM-163
>          URL: http://jira.codehaus.org/browse/SCM-163
>      Project: Maven SCM
>         Type: Bug

>   Components: maven-scm-provider-perforce
>     Versions: 1.0-beta-3
>     Reporter: John Didion
>     Assignee: Mike Perham
>     Priority: Critical

>
>
> We are trying to use continuum to build our project, which resides in a p4 
> repository. Continuum relies on the changelist from scm update to determine 
> whether or not to kick off a build. PerforceUpdateCommand uses 
> UpdateScmResult.setChanges() to set the change list, when it should actually 
> be setting the "updatedFiles" property. The AbstractUpdateCommand only looks 
> at updatedFiles when creating the change list (see ~ line 54).
> If you look at the update commands for any other provider you will see that 
> they do this. I'm not sure why the p4 one is different.
> The code should be:
> {noformat}
> if (!cosr.isSuccess()) {
>     new UpdateScmResult( 
>             cosr.getCommandLine(), 
>             cosr.getProviderMessage(), 
>             cosr.getCommandOutput(), 
>             false);
> }
>         
> return new UpdateScmResult( 
>         cosr.getCommandLine(), cosr.getCheckedOutFiles() );
> {noformat}
> If, for some reason, the UpdateScmResult for p4 must have the message and 
> output set, then you'll need to add a setter for updatedFiles and call that 
> instead of setChanges().

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to