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

ASF GitHub Bot commented on SCM-165:
------------------------------------

jira-importer commented on issue #441:
URL: https://github.com/apache/maven-scm/issues/441#issuecomment-2964594758

   **[John 
Didion](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jdidion)** 
commented
   
   This still breaks in continuum. Here's the problem: continuum may update 
many different projects within the same VM. If it is always updating the 
working directory on the client spec to a different directory, then every time 
the checkout command is executed perforce returns the entire set of source 
files. This means continuum will build the project every single time, even if 
no changes have occurred. Here's an example:
   
   1. Project 1's home is in /home/continuum/1
   2. Project 2's home is in /home/continuum/2
   3. Continuum builds project 1
   4. change log command creates clientspec foobar1
   5. Continuum builds project 2
   6. change log command uses default clientspec foobar1
   7. change log command sets working directory to /home/continuum/2
   8. Perforce interprets this as "the client has switched to a new working 
directory, and I have no idea what state the files in that directory are in, so 
I'm going to check out everything"
   9. Change list is generated, even though no files are changed
   10. Continuum proceeds to build project 2
   
   Suggested fix:
   1. Use a system property to determine whether or not to store clientspecs 
for future use. Default to true.
   2. Change PerforceChangeLogCommand to use 
PerforceScmProvider.getClientSpecName(). That way, it will generate the same 
clientspec used by the checkout command for the same working directory.
   
   Another fix would be to maintain a map of working directory to clientspec, 
but I'm not sure where exactly you'd store this.
   
   




> PerforceChangeLogCommand needs to use the same clientspec as the update 
> command
> -------------------------------------------------------------------------------
>
>                 Key: SCM-165
>                 URL: https://issues.apache.org/jira/browse/SCM-165
>             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-4
>
>         Attachments: PerforceChangeLogCommand.diff, svn.diff
>
>
> The PerforceChangeLogCommand as written does not work if the update was done 
> with the client spec generated by the checkout/update command. The attached 
> diff will fix the problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to