You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-626] permanent url for svn revision of a build #389
How does this now work since the "primitive XPath result sets now forbidden"? I can query without "text()" and have the surrounding XML - but that requires additional SED or other transformation to de-xml it.
How does this now work since the "primitive XPath result sets now forbidden"? I can query without "text()" and have the surrounding XML - but that requires additional SED or other transformation to de-xml it.
Activity
jenkins-infra-bot commentedon Jul 1, 2007
Raw content of original comment:
Implemented in 1.115 as a combination of two generic features.
1. I added svn revision info to the XML API of the build object. So now
http://hudson/job/foo/lastSuccessfullBuild/api/xml will include the information
you need.
2. The XML API takes optional 'xpath' query parameter to allow you to specify
which part of the information you'd like to retrieve. So you can request URL
like
http://localhost:8080/job/svn-test/lastSuccessfulBuild/api/xml?xpath=/*/changeSet/revision/revision/text()
to just fetch the revision number (say "1234"), then feed that into wget.
jenkins-infra-bot commentedon Jul 16, 2010
Raw content of original comment:
When you build twice in a row, the second build will probably have no changes. In that case, you won't be able to find out the working copy revision.
I have tested this on my Mercurial-backed project using a URL like this:
http://my-server/hudson/view/RC/job/My-job/102/api/xml?xpath=/*/changeSet/item[1]/node/text()
jenkins-infra-bot commentedon Feb 28, 2014
Raw content of original comment:
How does this now work since the "primitive XPath result sets now forbidden"? I can query without "text()" and have the surrounding XML - but that requires additional SED or other transformation to de-xml it.