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

Log message when svn URL is wrong could be better

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • subversion-plugin
    • None
    • Platform: All, OS: All

      I just debugged a problem that was manifesting itself as Hudson kept checking
      out a fresh copy of the workspace even when there were no changes. The message was:

      A SCM change trigger started this job
      Checking out a fresh workspace because the workspace is not
      https://SVNHOST.foo.com/rest/of/url

      The problem ended up being that I specified the hostname in the job
      configuration as all upper case (as shown), but the hostname recorded in the
      .svn/entries file was all lower case - svnhost.foo.com. I accept full
      responsibility for that buggering the job configuration, but the error message
      wasn't as helpful as it could have been.

      In IsUpdateableTask.invoke() in SubversionSCM.java, the code looks like:
      if(!svnInfo.url.equals(url))

      { listener.getLogger().println("Checking out a fresh workspace because the workspace is not "+url); return false; }

      I'd suggest changing the log message to something like:
      println("Checking out a fresh workspace because the workspace URL (" +
      svnInfo.url + ")is not "+url);

      I'd be willing to submit a real patch for this if requested.

          [JENKINS-4613] Log message when svn URL is wrong could be better

          gliptak added a comment -

          In addition, could the hostname be compared "ignore case"? Thanks

          gliptak added a comment - In addition, could the hostname be compared "ignore case"? Thanks

          kutzi added a comment -

          @cander: is this still a problem? If so, would you still be willing to submit a pull request?

          kutzi added a comment - @cander: is this still a problem? If so, would you still be willing to submit a pull request?

          cander added a comment -

          @kutzi - it's no longer a problem for me. Unfortunately, I'm not working much with Jenkins any more. Sorry.

          cander added a comment - @kutzi - it's no longer a problem for me. Unfortunately, I'm not working much with Jenkins any more. Sorry.

          If the problem remains, comparing them in SVNURL form seems to solve it.

          Yoichi Nakayama added a comment - If the problem remains, comparing them in SVNURL form seems to solve it.

          I've confirmed switching occur every time if I specify repository URL with upper case.
          I'll work on it.

          Yoichi Nakayama added a comment - I've confirmed switching occur every time if I specify repository URL with upper case. I'll work on it.

          The underlying problem was almost fixed in JENKINS-2556,
          except unnecessary switch.

          Yoichi Nakayama added a comment - The underlying problem was almost fixed in JENKINS-2556 , except unnecessary switch.

          Yoichi Nakayama added a comment - PR: https://github.com/jenkinsci/subversion-plugin/pull/58

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/scm/subversion/UpdateUpdater.java
          http://jenkins-ci.org/commit/subversion-plugin/32601b2522ec4910921cd29e772e501c4fd89857
          Log:
          Merge pull request #58 from yoichi/JENKINS-4613

          [FIXED JENKINS-4613]compare hostname in case-insensitive manner

          Compare: https://github.com/jenkinsci/subversion-plugin/compare/05651e105c1e...32601b2522ec

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/scm/subversion/UpdateUpdater.java http://jenkins-ci.org/commit/subversion-plugin/32601b2522ec4910921cd29e772e501c4fd89857 Log: Merge pull request #58 from yoichi/ JENKINS-4613 [FIXED JENKINS-4613] compare hostname in case-insensitive manner Compare: https://github.com/jenkinsci/subversion-plugin/compare/05651e105c1e...32601b2522ec

            yoichi Yoichi Nakayama
            cander cander
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: