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

"Always Force Sync" and "Don't update server database on sync (-p)" are not compatible with each other

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      Hi there,

      If you configure the Perforce plugin to "Always Force Sync" and "Don't update server database on sync (-p)" then this will fail with:

      [NvTriStrip] $ "C:
      Program Files\\Perforce
      p4.exe" -s sync -f -p //Jenkins_NvTriStrip-Build2/...@167119
      11:33:20 Caught exception communicating with perforce. Errors encountered while force syncing: error: Usage: sync [ -n -p -q ] [-m max] [files...]
      11:33:20 com.tek42.perforce.PerforceException: Errors encountered while force syncing: error: Usage: sync [ -n -p -q ] [-m max] [files...]
      11:33:20
      11:33:20 at com.tek42.perforce.parse.Workspaces.syncTo(Workspaces.java:167)
      11:33:20 at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:747)
      11:33:20 at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
      11:33:20 at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:579)
      11:33:20 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:468)
      11:33:20 at hudson.model.Run.run(Run.java:1408)
      11:33:20 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:252)
      11:33:20 at hudson.model.ResourceController.execute(ResourceController.java:88)
      11:33:20 at hudson.model.Executor.run(Executor.java:238)
      11:33:20 at hudson.model.OneOffExecutor.run(OneOffExecutor.java:66)
      11:33:20 ERROR: Unable to communicate with perforce. Errors encountered while force syncing: error: Usage: sync [ -n -p -q ] [-m max] [files...]

      Is it possible to update the Perforce plugin to at least warn or error if both these options are enabled?

      Regards,
      Tom.

        Attachments

          Activity

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              tfields Thomas Fields
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: