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

lshistory doesnt trigger builds for load rules with frontslashes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Platform: All, OS: Windows NT

    Description

      Hey,

      I was lost with the following problem: The lshistory checker for my hudson
      projects reported always lots of changes, but at the end of the page, it was
      written "Took 2.5 seconds, No changes". But obviously, there where many changes
      found, which somehow fall through the filter.

      A couple of hours later, I found that the problem was in my load rules.
      If I write the load rules with frontslashes "/" (e.g. src/plugins) like
      everywhere else in the hudson configs, the clearcase plugin will never trigger a
      build (always "no changes").
      If I change the load rules to use backslashes, everything works as designed.

      Tested on OS: Windows 2000 Server and Windows 2008 Server

      Attachments

        Activity

          abayer Andrew Bayer added a comment -

          Ah - I see the problem. We're using the load rules in a pattern which we then
          compare against each file that shows up in the lshistory - if the path (after
          the workspace/viewname/etc are removed) starts with any of the load rules, the
          file is counted as a change. Otherwise, it's ignored. You're specifying your
          load rules as "src/plugins", which is perfectly valid for a load rule regardless
          of OS, but since you're on Windows, the actual path we see in the lshistory
          output starts with "src\plugins", and that doesn't match "src/plugins" and is
          therefore ignored. I think this shouldn't be hard to fix - should be done in 1.1.

          abayer Andrew Bayer added a comment - Ah - I see the problem. We're using the load rules in a pattern which we then compare against each file that shows up in the lshistory - if the path (after the workspace/viewname/etc are removed) starts with any of the load rules, the file is counted as a change. Otherwise, it's ignored. You're specifying your load rules as "src/plugins", which is perfectly valid for a load rule regardless of OS, but since you're on Windows, the actual path we see in the lshistory output starts with "src\plugins", and that doesn't match "src/plugins" and is therefore ignored. I think this shouldn't be hard to fix - should be done in 1.1.

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseSCMTest.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseUcmSCMTest.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/base/BaseChangeLogActionTest.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/base/BaseHistoryActionTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23501
          Log:
          [FIXED JENKINS-4781] Using Unix slashes in Windows load rules no longer breaks lshistory

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseSCMTest.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseUcmSCMTest.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/base/BaseChangeLogActionTest.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/base/BaseHistoryActionTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=23501 Log: [FIXED JENKINS-4781] Using Unix slashes in Windows load rules no longer breaks lshistory

          People

            abayer Andrew Bayer
            girafi girafi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: