Issue Type: Bug Bug
Affects Versions: current
Assignee: Jesse Glick
Components: mercurial
Created: 07/Jun/13 2:56 AM
Description:

Push notifications do not work well with a Windows server accessing the repo as a local directory.

It looks like the issue is that, doNotifyCommit in MercurialStatus creates a URL out of the passed in Repo location string. This creates limitations that are not present when the Repository URL is passed into hg.

Additionally, the string passed into the push notification is processed as a URL when it goes through the web server, then it is processed again in the plugin. As a result, I had to double escape some characters.

Here is an example:
The URL I originally had in the settings: E:\Repo\Track App.hg
The job accesses the repo and updates the working directory properly.

If I access http://myjenkins:8080/mercurial/notifyCommit?url=""> App.hg
I get an illegal character exception.

I can get it to accept it if I double escape the illegal characters.
http://myjenkins:8080/mercurial/notifyCommit?url="">

This doesn't work because, when looking for a relevant job, it fails on this comparison:
E:%5CRepoApps%5CRepo%5CTrack%20App.hg == E:\RepoApps\Repo\Track App.hg

It needs both the URL in the settings to be escaped in the same way as the one passed into the web API. I can't find a way to do this with a local directory.

This also may not work because it seems to process the string in the settings page as a URL as well, so this may fail with illegal characters.

The double processing of the string in the API would be OK if it then compared a fully escaped string to the string in the settings page (without trying to escape the settings string as well). I would be able to construct an API call that would make it through processing and match correctly.

I found a convoluted way to get this to work with the current design. It needs a network share instead of a local directory.
The URL in settings looks like this:
file:%5C%5CSERVER%5CRepo%5CTrack%20App.hg
And the API call:
http://myjenkins:8080/mercurial/notifyCommit?url="">

This work-around has one final problem. The convoluted URL in the settings does not match the one hg adds to hgrc. This causes the repo to be cloned for every build. I was able to work around this by manually updating the hgrc file in the workspace with the expected string.

After all this tweaking, it seems to work OK.

Environment: Windows Server 2003
Project: Jenkins
Priority: Major Major
Reporter: Dan Jasek
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to