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

Spaces in cvs module name breaks functionallity of "after the fact tagging"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cvs-plugin
    • Labels:
      None
    • Environment:
      Platform: PC, OS: Windows 2000
    • Similar Issues:

      Description

      "After the fact tagging" is broken when using the CVS plugin and specifying a job with only one
      cvs module (flatten) if the module name contains spaces.

      I've identified the problem to origin from the way that the cvs-zip-archive is generated during
      checkout. When only one cvs-module is specified, the name of the module is used "as is" directly
      from the field "module", hence still containing the backslash "space-escape"-character. This is in
      contrast to when multiple cvs modules is specified, in which case all the modules are normalized
      before calling the archive-function. (This asymmetry probably explains why issue #691 has been
      closed as invalid while actually still an issue when only using a single cvs module).

      The fix to this issue (as far as I've been able to test it) is to use
      "getAllModulesNormalized()[0]" instead of the field 'modules' in line 377 of
      "hudson.scm.CVSSCM.java":

      [ORG]

      line 376                if(flatten) {
      line 377                    archive(ws, module, zos,true);
      line 378                } else {
      

      [NEW]

      line 376                if(flatten) {
      line 377                    archive(ws, getAllModulesNormalized()[0], zos,true);
      line 378                } else {
      

        Attachments

          Activity

          boerrild boerrild created issue -
          boerrild boerrild made changes -
          Field Original Value New Value
          Watchers None None
          Description "After the fact tagging" is broken when using the CVS plugin and specifying a job with only one
          cvs module (flatten) if the module name contains spaces.

          I've identified the problem to origin from the way that the cvs-zip-archive is generated during
          checkout. When only one cvs-module is specified, the name of the module is used "as is" directly
          from the field "module", hence still containing the backslash "space-escape"-character. This is in
          contrast to when multiple cvs modules is specified, in which case all the modules are normalized
          before calling the archive-function. (This asymmetry probably explains why issue #691 has been
          closed as invalid while actually still an issue when only using a single cvs module).

          The fix to this issue (as far as I've been able to test it) is to use
          "getAllModulesNormalized()[0]" instead of the field 'modules' in line 377 of
          "hudson.scm.CVSSCM.java":

          [ORG]
          line 376 if(flatten) {
          line 377 archive(ws, module, zos,true);
          line 378 } else {

          [NEW]
          line 376 if(flatten) {
          line 377 archive(ws, getAllModulesNormalized()[0], zos,true);
          line 378 } else {
          "After the fact tagging" is broken when using the CVS plugin and specifying a job with only one
          cvs module (flatten) if the module name contains spaces.

          I've identified the problem to origin from the way that the cvs-zip-archive is generated during
          checkout. When only one cvs-module is specified, the name of the module is used "as is" directly
          from the field "module", hence still containing the backslash "space-escape"-character. This is in
          contrast to when multiple cvs modules is specified, in which case all the modules are normalized
          before calling the archive-function. (This asymmetry probably explains why issue #691 has been
          closed as invalid while actually still an issue when only using a single cvs module).

          The fix to this issue (as far as I've been able to test it) is to use
          "getAllModulesNormalized()[0]" instead of the field 'modules' in line 377 of
          "hudson.scm.CVSSCM.java":

          [ORG]
          {code}
          line 376 if(flatten) {
          line 377 archive(ws, module, zos,true);
          line 378 } else {
          {code}

          [NEW]
          {code}
          line 376 if(flatten) {
          line 377 archive(ws, getAllModulesNormalized()[0], zos,true);
          line 378 } else {
          {code}
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 135034 ] JNJira + In-Review [ 203218 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            boerrild boerrild
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: