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

Log message when svn URL is wrong could be better

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            gliptak gliptak added a comment -

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

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

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

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

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

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

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

            Show
            yoichi Yoichi Nakayama added a comment - If the problem remains, comparing them in SVNURL form seems to solve it.
            Hide
            yoichi 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.

            Show
            yoichi 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.
            Hide
            yoichi Yoichi Nakayama added a comment -

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

            Show
            yoichi Yoichi Nakayama added a comment - The underlying problem was almost fixed in JENKINS-2556 , except unnecessary switch.
            Show
            yoichi Yoichi Nakayama added a comment - PR: https://github.com/jenkinsci/subversion-plugin/pull/58
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: