views:

95

answers:

2

How do I ask Hudson to build a specific revision (instead of the latest one)? I am using Mercurial in case that's relevant.

+2  A: 

I am not sure if this will help in your case(Hudson), Normally if we want to build a specific revision we update to that revision build it. You can update to a revision by:

hg update -r <revision>

That update the repo to given revision and you can run your build commands

or if you don't want to do build inside the repo you can archive it and build out side the repo

hg archive -r <revision>

hg help archive
in3xes
+3  A: 

Under the Hudson project's Mercurial configuration, you can try putting the revision you'd like to build into the Branch field. (And if that doesn't work create a branch based on that revision.)

More generally, if you want the ability to build a revision that you specify at build time, you can configure a parameterized build that uses the user-specified revision parameter in the Branch field. The Mercurial Plugin claims to support parameters in the Branch field (as of version 1.26).

[Disclaimer: I don't have the setup to try this myself. So it's an educated guess.]

Dave Bacher
@Dave, your answer is correct except that you talk about parameterizing the branch where in fact you should be parameterizing the revision.
Gili
@Gili, I tried to clarify my answer. The wording is awkward because the Hudson field where revision can be specified is named *Branch*
Dave Bacher