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

Local repo location string not aggressively normalized

    XMLWordPrintable

    Details

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

      Description

      This is v1.8 of the Mercurial plugin, and (though I believe it's irrelevant)
      1.186 of hudson.

      I'm running Hudson on the same machine as my hg repo. I entered the path to my
      repo as /xyz. The first build was fine, but because the cloned repo's hgrc file
      listed the repo location as c:\xyz,
      hudson.plugins.mercurial.MercurialSCM.checkout saw these two strings as
      different and tried to do a clone instead of an update. It correctly did an
      update once I changed my hudson config repo string to c:\xyz to match hgrc.
      Perhaps there's some normalization to be done on local repo paths.

      On a side note, and I haven't looked into this, when it was trying to do the
      clone via first doing a delete, it could not delete the hgrc file (using
      Windows). However if I deleted hgrc manually, then ran the build, it deleted
      the rest of the stuff just fine. Seems like a bug.

        Attachments

          Issue Links

            Activity

            Hide
            medotin medotin added a comment -

            Regarding the 'side note', this bug reflects the problem:
            https://hudson.dev.java.net/issues/show_bug.cgi?id=912

            Show
            medotin medotin added a comment - Regarding the 'side note', this bug reflects the problem: https://hudson.dev.java.net/issues/show_bug.cgi?id=912
            Hide
            medotin medotin added a comment -

            Um... why can't I comment on issue 912? By default, can users only comment on
            issues they report or are assigned to? Crappy.

            Show
            medotin medotin added a comment - Um... why can't I comment on issue 912? By default, can users only comment on issues they report or are assigned to? Crappy.
            Hide
            jglick Jesse Glick added a comment -

            Currently we have

            if(upstream.equals(source)) return true;
            if((upstream+'/').equals(source)) return true;
            return source.startsWith("file:/") && new
            File(upstream).toURI().toString().equals(source);

            Perhaps this needs to do more tricks to handle filename normalization,
            especially on Windows. But the obvious workaround is for the user to enter the
            proper absolute file path to begin with.

            Show
            jglick Jesse Glick added a comment - Currently we have if(upstream.equals(source)) return true; if((upstream+'/').equals(source)) return true; return source.startsWith("file:/") && new File(upstream).toURI().toString().equals(source); Perhaps this needs to do more tricks to handle filename normalization, especially on Windows. But the obvious workaround is for the user to enter the proper absolute file path to begin with.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : jglick
            Path:
            trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialSCM.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=21788
            Log:
            JENKINS-1420 If switching to clone due to path mismatch, at least explain what is happening in the build log.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialSCM.java http://fisheye4.cenqua.com/changelog/hudson/?cs=21788 Log: JENKINS-1420 If switching to clone due to path mismatch, at least explain what is happening in the build log.
            Hide
            davidmc24 davidmc24 added a comment -

            (Re: the side note) Issue 912 is accessible as JENKINS-912, and should already be fixed.

            Show
            davidmc24 davidmc24 added a comment - (Re: the side note) Issue 912 is accessible as JENKINS-912 , and should already be fixed.
            Hide
            jglick Jesse Glick added a comment -

            Possibly resolved by the fix of JENKINS-13400. If the problem persists in the future, reopen (or file a new bug) and include the portion of the build log that says "...which looks different than..." as that will indicate how to write a test for the problem.

            Show
            jglick Jesse Glick added a comment - Possibly resolved by the fix of JENKINS-13400 . If the problem persists in the future, reopen (or file a new bug) and include the portion of the build log that says "...which looks different than..." as that will indicate how to write a test for the problem.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                medotin medotin
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: