We have an SCM-controlled project that polls a repo every several minutes. Overall the workflow is great but occasionally I need to push the new changes to the server's repository without triggering a build in Jenkins (for various reasons: long builds, minor changes, concurrent commits etc).

I have already set up a quiet period, and sometimes I just start and stop the build (which is awkward), so the Jenkins pulls the changes and does not trigger the build later.

Cédric, you're right, both options are good and reasonable. It's a pity that MercurialSCM doesn't yet support a similar concept. As to the first one, there are a few issues: you must have an access to the SCM server (which I don't) and you have to know that the commit will be minor a priori. We also constantly add new projects to Jenkins, so configuring SCM for every new project might be tiresome.
–
Vladimir SinenkoMay 22 '12 at 12:33

Another idea (not necessarily a better one, but it may better suit your tastes): use Run Condition Plugin. Make the rest of your build conditional on a parameter (let's name it DO_BUILD). Set that parameter to TRUE by default. If you need to commit something without triggering the build set DO_BUILD default to FALSE.

A variation on the same idea: you do your polling in one job (Trigger) that calls your main job via Parameterized Trigger Plugin in a build step. That build step is then can be conditioned upon a parameter. Note that in this case you will either have to use the same custom workspace for both builds, or do a manual check out (say, in a shell build step) in the main job.