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

Perforce plugin exception when file name contain $

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Windows 7
    • Similar Issues:

      Description

      The following exception is generated if the change list contains filenames which include the $ character.
      I would appear as if the filename is being passed through a regex without being correctly escaped first.

      ----------------------------------------------------------------------------------------------------------------------------
      Started by an SCM change
      Building remotely on build6pcw7
      Using remote perforce client: ms_build6pcw7_Games_EVO11-Tools__Edit
      [EVO11-Tools] $ "C:
      Program Files\\Perforce
      p4.exe" workspace -o ms_build6pcw7_Games_EVO11-Tools__Edit
      'Don't update client' is set. Not saving the client changes.
      Last build changeset: 463401
      [EVO11-Tools] $ "C:
      Program Files\\Perforce
      p4.exe" counter change
      [EVO11-Tools] $ "C:
      Program Files\\Perforce
      p4.exe" -s changes //ms_build6pcw7_Games_EVO11-Tools__Edit/...@463402,@463436
      [EVO11-Tools] $ "C:
      Program Files\\Perforce
      p4.exe" describe -s 463436
      [EVO11-Tools] $ "C:
      Program Files\\Perforce
      p4.exe" -G where //...
      [EVO11-Tools] $ "C:
      Program Files\\Perforce
      p4.exe" describe -s 463404
      FATAL: Illegal group reference
      java.lang.IllegalArgumentException: Illegal group reference
      at java.util.regex.Matcher.appendReplacement(Unknown Source)
      at java.util.regex.Matcher.replaceFirst(Unknown Source)
      at hudson.plugins.perforce.PerforceSCMHelper.doMapping(PerforceSCMHelper.java:255)
      at hudson.plugins.perforce.PerforceSCMHelper.mapToWorkspace(PerforceSCMHelper.java:189)
      at com.tek42.perforce.parse.Changes.getWorkspacePathForFile(Changes.java:95)
      at com.tek42.perforce.parse.Changes.calculateWorkspacePaths(Changes.java:89)
      at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:71)
      at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:425)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:634)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:566)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:454)
      at hudson.model.Run.run(Run.java:1376)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCMHelper.java
          src/test/java/hudson/plugins/perforce/PerforceSCMHelperTest.java
          http://jenkins-ci.org/commit/perforce-plugin/6471d3a95d872ef94b043e40d66301734516fd19
          Log:
          [FIXED JENKINS-11070] handle $ in filenames.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceSCMHelper.java src/test/java/hudson/plugins/perforce/PerforceSCMHelperTest.java http://jenkins-ci.org/commit/perforce-plugin/6471d3a95d872ef94b043e40d66301734516fd19 Log: [FIXED JENKINS-11070] handle $ in filenames.
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_perforce #139
          [FIXED JENKINS-11070] handle $ in filenames.

          Rob Petti :
          Files :

          • src/test/java/hudson/plugins/perforce/PerforceSCMHelperTest.java
          • src/main/java/hudson/plugins/perforce/PerforceSCMHelper.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_perforce #139 [FIXED JENKINS-11070] handle $ in filenames. Rob Petti : Files : src/test/java/hudson/plugins/perforce/PerforceSCMHelperTest.java src/main/java/hudson/plugins/perforce/PerforceSCMHelper.java

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              richardtaylor Richard Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: