Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6219

P4 plugin should force sync when changing workspace root

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When renaming a Hudson job, then perforce updates the client workspace root but does not perform a force sync.
      As a result, perforce attempts to sync to the new location but does not copy any files from P4 server because the
      "P4 have" table is telling perforce that the files already exist in the workspace.

      We find that the build will fail on every node after renaming a job.

      An easy way to fix this would be to run "P4 flush //...#0" after the workspace rename. This would tell perforce that the workspace is empty and the next regular sync would then sync all the files. Our assumption is that when Hudson renames the job that the workspace directory is not moved from the old location but is empty.

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          I'll add some code to detect when the root has been changed, and trigger a force-sync accordingly.

          Show
          rpetti Rob Petti added a comment - I'll add some code to detect when the root has been changed, and trigger a force-sync accordingly.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : rpetti
          Path:
          trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java
          http://jenkins-ci.org/commit/29912
          Log:
          [FIXED JENKINS-6219] trigger a one-time force sync on the next build when the workspace root changes

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rpetti Path: trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/29912 Log: [FIXED JENKINS-6219] trigger a one-time force sync on the next build when the workspace root changes

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              usammmy usammmy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: