-
Patch
-
Resolution: Duplicate
-
Major
-
None
-
Windows 2003 server
It seems that if you use a url such as http://myserver/svn/myrepo@HEAD or http://myserver/svn/myrepo@1234 then the SVN_REVISION and SVN_URL environment variables are never set.
I can confirm this is the issue as removing @HEAD or @REV results in them being populated again (so in this case only using http://myserver/svn/myrepo).
- duplicates
-
JENKINS-10942 SVN_URL and SVN_REVISION are not set when using @NNN in Subversion URL
-
- Resolved
-
- is duplicated by
-
JENKINS-4870 SVN_REVISION is empty when using @NNN syntax in svn url
-
- Resolved
-
It appears the problem is this:
Line 449 SubversionSCM.java
if(svnLocations.length==1) {
Long rev = revisions.get(svnLocations[0].remote);
if(rev!=null) {
svnLocations[0].remote contains http://myserver/svn/repo@HEAD, and revisions[0] key contains http://myserver/svn/repo hence the value of the map "rev" is never found and is always null.
The root of the @HEAD being set in svnLocations[0].remote seems to happen in:
Line 2090 in SubversionScm.java here:
public ModuleLocation(String remote, String local) {
this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim());
String remote = http://myserver/svn/repo@HEAD, I believe it should search for the last @ char and remove everything after it?