Issue Details (XML | Word | Printable)

Key: HUDSON-1420
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: jglick
Reporter: medotin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hudson

Local repo location string not aggressively normalized

Created: 14/Mar/08 08:41 AM   Updated: 30/Nov/09 01:33 PM
Component/s: mercurial
Affects Version/s: current
Fix Version/s: None

Environment: Platform: All, OS: All


 Description  « Hide

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.



Sort Order: Ascending order - Click to sort in descending order
medotin added a comment - 15/Mar/08 08:06 PM

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


medotin added a comment - 15/Mar/08 08:10 PM

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


jglick added a comment - 17/Sep/09 11:23 AM

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.


scm_issue_link added a comment - 17/Sep/09 11:36 AM

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:
HUDSON-1420 If switching to clone due to path mismatch, at least explain what is happening in the build log.