You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-dev@maven.apache.org by "Mike Perham (JIRA)" <ji...@codehaus.org> on 2006/02/23 16:51:36 UTC

[jira] Resolved: (SCM-163) PerforceUpdateCommand does not correctly return change list

     [ http://jira.codehaus.org/browse/SCM-163?page=all ]
     
Mike Perham resolved SCM-163:
-----------------------------

    Resolution: Fixed

> 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