I also experienced this problem but resolved it by getting rid of closed heads in my branch, as described below.
I have two jobs polling the same repository, one looks at the default branch (and experiences this problem) and the other looks at a different branch and doesn't have this problem.
The Mercurial Polling Log looks like this for the job that fails.
Started on 29-Aug-2012 13:15:34
[sources] $ hg pull --rev default
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
pulling from https://build_username@bitbucket.org/rory_kingan/rm_dev
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
no changes found
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
[sources] $ hg log --style "C:\Program Files (x86)\Jenkins\jobs\rm_dev\workspace\tmp5625191036952426754style" --branch default --no-merges --prune cd316d1d748736c5d36d113dda1a87af275c5226
id:00c102bbf7d0b012550c26cbca9a48c3c48eff2b
files:Code/Sundi... LIST OF FILES HERE...:
id:c1109d0cd1b75c26899856decd0717d37e37e4f2
files:Code/Sundi... LIST OF FILES HERE...:
id:4e6f64bfa355542e857cb315f15fba537885dd63
files:Code/Sundi... LIST OF FILES HERE...:
id:77902d778f52875b624fc18b9760ad295093239f
files:Code/Sundi... LIST OF FILES HERE...:
id:e7b1f9d32e46b99a11443d13c9dc2973dce9527d
files:Code/Sundi... LIST OF FILES HERE...:
id:85a021f78f2c2f1908403bab2a64e0db95fb8e4e
files:.hgtags:
id:6eefa3cdb0843fda9c59d56d430e0a77f4ebabe2
files:Code/Sundi... LIST OF FILES HERE...:
id:379762d7b1d909b99cb1cb0905918a13e463e8a0
files:Code/Sundi... LIST OF FILES HERE...:
id:c181dbccbf8495bec5f4699d4b1489d7f8e50a76
files:Code/Sundi... LIST OF FILES HERE...:
Dependent changes detected
Done. Took 7.3 sec
Changes found
Based on the files that were listed in those supposed changes it looks like they're from closed heads.
If I go to my repository folder locally, which is up to date on default branch and do
> hg summary
then it tells me the parent revision, in my case cd316d1d7487.
If I then see what that hg log command will output
> hg log --branch default --no-merges --prune cd316d1d7487
I find it lists a bunch of old changesets on Closed heads on the default branch. We had these from some dodgy merging someone did ages back. We closed the head but clearly hg still sees it when performing an 'hg log', hence Jenkins thinks it's something new and that it needs to do a build.
I resolved this problem for our repository by finding those changesets and merging them in to my default branch, using the option to discard all changes (I used TortoiseHg so not sure what the command-line option was). Then when I did the 'hg log ... --prune...' command there were no changesets listsed, and bingo, problem fixed on Jenkins too.
Possibly Jenkins could avoid this issue by using a different hg command that ignores closed heads. Or possibly the best solution is just to not have other heads in your branch.
Same thing on my side.
Maybe this info can help:
The polled repo contains a sub-repo in which there are large files (files tagged with --large mercurial extension)