My apologies to those whose builds were broken by this fix.
We can certainly revert this change if necessary, but I would argue that the
current behavior is more correct. There is a difference between the workspace
and the checkout location. This may go unnoticed by those who have one job per
workspace, but for those with multiple jobs sharing a single workspace, it
becomes immediately evident. The SCM module is overstepping its bounds by
killing the entire workspace. As I see it, the SCM module's scope should be
limited to the checkout locations it controls.
I'd suggest that a better solution would be to make the same change (keep
workspace, wipeout checkout location only) in all SCM modules/plugins and create
a build wrapper that wipes out the workspace only if that behaviour is
explicitly requested.
Code changed in hudson
User: : kaxelson
Path:
trunk/hudson/main/core/src/main/java/hudson/scm/SubversionSCM.java
http://fisheye4.cenqua.com/changelog/hudson/?cs=17550
Log:
JENKINS-3580: [FIXED JENKINS-3580]
When a checkout occurs, only the existing checkout location(s) is/are deleted, not the entire workspace.