jenkinsci/jenkins — pull request #323 by davidmc24 (2011-12-04 00:32:44+00:00)
Title: Don't call SCM#calcPollingingBaseline if SCM#checkout fails

In the JavaDocs for SCM#calcRevisionsFromBuild, if says:
This method is called after source code is checked out for the given build (that is, after SCM#checkout has finished successfully.)

This appears to make sense; after you have a known SCM state, you calculate the revisions. It doesn't explicitly state it, but it
implies that it won't be called if checkout failed. In those cases, the state may well not be known, and it doesn't make sense to
attempt to calculate the revisions.

The behavior in AbstractProject#checkout has been to always call calcPollingBaseline, regardless of whether checkout failed or
succeeded. This is causing misleading error output for the mercurial plugin. With this change, AbstractProject will only do the
calculations when checkout succeeds.