Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't call SCM#calcPollingingBaseline if SCM#checkout fails #323

Merged
merged 1 commit into from Dec 4, 2011
Merged

Don't call SCM#calcPollingingBaseline if SCM#checkout fails #323

merged 1 commit into from Dec 4, 2011

Conversation

davidmc24
Copy link
Contributor

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.

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.
kutzi added a commit that referenced this pull request Dec 4, 2011
Don't call SCM#calcPollingingBaseline if SCM#checkout fails
@kutzi kutzi merged commit 1fe71dd into jenkinsci:master Dec 4, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants