Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-163

PerforceUpdateCommand does not correctly return change list

    XMLWordPrintableJSON

Details

    Description

      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:

      if (!cosr.isSuccess()) {
          new UpdateScmResult( 
                  cosr.getCommandLine(), 
                  cosr.getProviderMessage(), 
                  cosr.getCommandOutput(), 
                  false);
      }
              
      return new UpdateScmResult( 
              cosr.getCommandLine(), cosr.getCheckedOutFiles() );
      

      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().

      Attachments

        Activity

          People

            mperham Mike Perham
            jdidion John Didion
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: