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

Paths not "sanitized" in AccuRev CheckForChanges

    XMLWordPrintable

Details

    Description

      Recently I added a job that uses a filter when polling the SCM.
      In the log I could see the message This transaction seems to have happened after the latest build!!!, but no build was triggered.
      After looking in the code I'm pretty sure that this is due to the fact that the paths are not sanitized in CheckForChanges.java.
      By that I mean that my paths might contain different path separators (forward/backward slashes) than the paths in serverPaths.

      I think that converting the path to a File object and back might help (have not yet tried this), but other/better fixes/suggestions are welcome.

      Attachments

        Activity

          arnom Arno Moonen added a comment -

          I've created a fix for this (PR coming up).

          Problem was not only that the paths were not sanitized, but also that, as soon as a transaction was found that had paths that did not match, it stopped checking for other transaction types.

          arnom Arno Moonen added a comment - I've created a fix for this (PR coming up). Problem was not only that the paths were not sanitized, but also that, as soon as a transaction was found that had paths that did not match, it stopped checking for other transaction types.
          arnom Arno Moonen added a comment - PR: https://github.com/jenkinsci/accurev-plugin/pull/37
          arnom Arno Moonen added a comment -

          PR has been merged. Should be fixed in next release.

          arnom Arno Moonen added a comment - PR has been merged. Should be fixed in next release.

          Code changed in jenkins
          User: Arno Moonen
          Path:
          src/main/java/hudson/plugins/accurev/CheckForChanges.java
          http://jenkins-ci.org/commit/accurev-plugin/81d07fe4c7232b0dcb72edc39530098935480a35
          Log:
          Merge PR #37

          • Refactored some code in CheckForChanges and tried to sanitize the paths ( #JENKINS-41018 ).
          • Processed the comments from @casz and made more use of the Apache Commons library (related to #JENKINS-41018 ).
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arno Moonen Path: src/main/java/hudson/plugins/accurev/CheckForChanges.java http://jenkins-ci.org/commit/accurev-plugin/81d07fe4c7232b0dcb72edc39530098935480a35 Log: Merge PR #37 Refactored some code in CheckForChanges and tried to sanitize the paths ( # JENKINS-41018 ). Processed the comments from @casz and made more use of the Apache Commons library (related to # JENKINS-41018 ).

          People

            arnom Arno Moonen
            arnom Arno Moonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: