Force Jenkins Subversion plugin to use HEAD revision - hudson

I was using Hudson for doing my project builds and now planning to migrate to Jenkins.
The build server time is not in sync with the developer machines, and hence svn update does not work correctly. In Hudson, I was able to set the revision policy to HEAD, whereas its missing in Jenkins.
I searched a bit and saw that a Jira is created for this issue, but did not find a working solution for the problem.
I tried to manually install the Hudson subversion plugin in Jenkins, and the Revision policy option came up, but for some reason it caused an exception while setting the svn authentication info.
If anyone knows a solution to make this change in Jenkins, kindly reply.

Figured out. Append all SVN urls with #HEAD and svn update will happen from HEAD!

The plugin doesn't offer such feature but you might find useful this jira issue. There is a patch in the comments for that purpose. See Issue 1241.

Related

How to use Mercurial in side Eclipse Helios (3.6)

I am using Eclipse Helios (3.6). I want to use Mercurial for version management of the program. I have take the help of the below link to find out the plugin but not got any success:
Mercurial Eclipse Plugin
Can any one please help to install Mercurial plugins inside my Eclipse and I also don't know how to use also. I have gone through the video also but not clear.
http://www.youtube.com/watch?v=9OBg6Zv0Tns
My question is that I want to use Mercurial in my project for version control. I know what Mercurial is, but don't know how to use it.
I want to know what is the initial setup that I have do if I want to use Mercurial set up in my project.
When I am trying to add new software It is giving me following error.
the 'Duplicate Location' error message in your screenshot would indicate that there is already an update site setup for that URL.
In the screen before doing the 'add repository' look at the list of current update sites and you may find one for Mercurial already. Make sure it is selected and a list of all the features for that update site will be listed for you. Then you can select the MercurialEclipse and MercurialBinaries features and install then in Eclipse
The Mercurial Eclipse homepage is here: http://javaforge.com/project/HGE.
They have installation instructions there:
[...] you can get the plugin easily using the Eclipse Update Manager, just click Help → Software Updates in Eclipse. The Eclipse Update Site for MercurialEclipse is available at this URL:
http://cbes.javaforge.com/update
If you are not familiar with getting new software and updates to Eclipse, please read this article.

m2eclipse on windows with Mercurial does not allow hg to be used on the "Check out Maven Projects from SCM" wizard

I followed the answer from this posting:
How to use Mercurial, Maven and Eclipse together?
But the "Check out Maven Projects from SCM" still does not allow me to use Mercurial SCM.
The only option I get is "svn" in the dropdown, and even if I ignore the drop down and enter in "scm:hg:http://myMercurialRepoURL"
I'm using:
Eclipse 3.6.1
m2eclipse 0.12 from http://m2eclipse.sonatype.org/sites/m2e
"Maven SCM handler for Subclipse" 0.12.0 from m2eclipse extra's site (sorry, I would give the URL, but my new account doesn't have enough rep)
MercurialEclipse 1.8.1 from http://cbes.javaforge.com/update
And I've uninstalled, and reinstall those plugins in that order.
I'm able to use Maven in projects, and use Mercurial separately in Eclipse - it's just this one Wizard that seems to be broken, which leads me to believe that if I try to Materialize an Artifact from a Mercurial repo that it will also fail.
Has anyone had any luck with this Wizard? Perhaps on earlier versions? Is this a new bug?
Thanks
As far my search went, I didn't get to find a suitable connector for mercurial and m2eclipse (in terms of only using IDE). However, I did an experiment wherein I cloned a copy of the source from outside the IDE. (via TortoiseHg specifically)
Afterwards, assuming you have already m2e installed in Eclipse:
Go to File > import > maven > existing maven projects, then select the folder where you've originally pulled/cloned your source code.
I believe by doing so, you'll see the m2e commands in the project's context menu (via run as), and effective use mercurial commands. (via team context menu)
At least for now, this is better not using m2e and mercurial at the same time.
If anyone has a more streamlined approach, I'm also curious. :D

Does mercurial-server support subrepo?

I installed mercurial-server on one of my machines, cloned my project there, it has 3 subrepos, and when I try to clone it back to another location I get an error:
remote: mercurial-server: Cannot
create repo under existing repo
abort: no suitable response from
remote hg!
So I'm starting to think that mercurial-server doesn't handle subrepo.
Any clue?
The new version released in December 2010 does support sub repos.
Their changelog never mentions subrepos.
Nor does their documentation.
So it is quite possible they don"t support that feature yet, but I wouldn't know for sure.
I got an answer from the developers of mercurial-server saying that they don't support it yet.
This post says that disabling the "checkParents" code will enable support for subrepos.
EDIT
I've tried using it recently and it works just fine even without changing any default settings.
I found that you need to set up the locations for any subrepos inside the "mercurial.ini" settings file.
For a subrepo named "mysubrepo", you need to add the line
[subpaths]
mysubrepo = ssh://hg#myserver/subrepolocation

How can one configure Hudson to integrate with Sventon?

Hudson ver. 1.353
Sventon ver. 2.14
I just cannot figure out how to configure Hudson to work with Sventon. It seems that the path format that Hudson expects from Sventon is not the format used by Sventon.
Any ideas?
Thanks.
UPDATE
Given an SVN repository with the name of windows, the Sventon URL path to the repository is http://dev-builder:8080/svn/repos/windows/list/
However, Hudson expects something like
http://dev-builder:8080/svn/repobrowser.svn?name=windows
Can anyone explain how this should be configured?
Regarding configuration, under the Source Code Management section of a job configuration, the Repository Browser dropdown lists Sventon 2.x as one of the options. (Not trying to be snarky, just making sure you're using the correct configuration.)
There are some Hudson bugs (search for sventon) in various states that might be related to your issue.
It's not clear to me whether this is a configuration problem or a Hudson bug. You could post the relevant configuration and both the paths that Hudson generates and Sventon expects. If it is a reproducible Hudson bug, reporting it to the Hudson bug database is the best bet.
Update with my experience: Under Source Code Management, I configured my Repository Browser to be Sventon 2.x and set the Repository URL to http://localhost:8080/svn and Repository Instance to windows. Hudson then listed changes with Sventon links as http://localhost:8080/svn/repos/windows/info?revision=XYZ
I think this means you should set:
Repository Browser to Sventon 2.x
Repository URL to http://dev-builder:8080/svn, and
Repository Instance to windows
Beware that the Hudson inline documentation for Sventon 2.x is wrong about the URLs that will be generated. It looks like this was never updated from 1.x.
You should however be aware that Sventon does not integrate well with projects that have multiple modules from different repositories. We for example use repositories A, B and C. And we've set our repository instance to A so that we can browse to things in that repository but not in any of the other.
Otherwise I really like Sventon as a svn browser.

Problem with Hudson-JIRA-Perforce integration

I'm looking at using the Hudson JIRA plugin to post a JIRA comment on each build. The SCM I'm using is perforce which is already linked to the JIRA tasks using perforce jobs. I can see that the JIRA story (e.g. PROJ-001) is visible through the perforce plugin when clicking on the changelist number in the build reports.
I'm having problems getting the Hudson JIRA plugin to work as it appears to expect the JIRA story in the change text rather than using the perforce job reference.
Note, manually adding the JIRA story into the changetext for every commit is not an option, but I was wondering whether any had any ideas short of extending the JIRA plugin itself.
Have you tried any of these???
http://wiki.hudson-ci.org/display/HUDSON/JIRA+Plugin
https://plugins.atlassian.com/plugin/details/11858
Why don't you use Marvelution JIRA Hudson Integration? I tried it and it worked perfect.