[ 
https://issues.apache.org/jira/browse/SCM-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17964398#comment-17964398
 ] 

Olivier Lamy commented on SCM-163:
----------------------------------

This project has moved from Jira to GitHub Issues. This issue was migrated to 
[apache/maven-scm#476|https://github.com/apache/maven-scm/issues/476]. 

> PerforceUpdateCommand does not correctly return change list
> -----------------------------------------------------------
>
>                 Key: SCM-163
>                 URL: https://issues.apache.org/jira/browse/SCM-163
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-perforce
>    Affects Versions: 1.0-beta-3
>            Reporter: John Didion
>            Assignee: Mike Perham
>            Priority: Critical
>             Fix For: 1.0-beta-3
>
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to