mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
Merged revisions 28499 via svnmerge from
https://svn.dev.java.net/svn/hudson/branches/rc ........ r28499 | kohsuke | 2010-03-10 11:57:23 -0800 (Wed, 10 Mar 2010) | 1 line Do the same protection to _calcRevisionsFromBuild to avoid HUDSON-5756 ........ git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28507 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
007ce08a1c
commit
def99d53d1
2 files changed
+19
-11
No files matched your search
@@ -1049,7 +1049,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
SCMRevisionState baseline = build.getAction(SCMRevisionState.class);
|
||||
if (baseline==null) {
|
||||
try {
|
||||
baseline = safeCalcRevisionsFromBuild(build, launcher, listener);
|
||||
baseline = getScm()._calcRevisionsFromBuild(build, launcher, listener);
|
||||
} catch (AbstractMethodError e) {
|
||||
baseline = SCMRevisionState.NONE; // pre-1.345 SCM implementations, which doesn't use the baseline in polling
|
||||
}
|
||||
@@ -1063,7 +1063,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
* For reasons I don't understand, if I inline this method, AbstractMethodError escapes try/catch block.
|
||||
*/
|
||||
private SCMRevisionState safeCalcRevisionsFromBuild(AbstractBuild build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
|
||||
return getScm().calcRevisionsFromBuild(build, launcher, listener);
|
||||
return getScm()._calcRevisionsFromBuild(build, launcher, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -293,6 +293,14 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
|
||||
*/
|
||||
public abstract SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?,?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException;
|
||||
|
||||
/**
|
||||
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
|
||||
* on BugParade for more details.
|
||||
*/
|
||||
public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
|
||||
return calcRevisionsFromBuild(build, launcher, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the current state of the remote repository against the given baseline {@link SCMRevisionState}.
|
||||
*
|
||||
@@ -335,6 +343,14 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
|
||||
*/
|
||||
protected abstract PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException;
|
||||
|
||||
/**
|
||||
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
|
||||
* on BugParade for more details.
|
||||
*/
|
||||
private PollingResult _compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline2) throws IOException, InterruptedException {
|
||||
return compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method for the caller to handle the backward compatibility between pre 1.345 SCMs.
|
||||
*/
|
||||
@@ -346,7 +362,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
|
||||
if (baseline!=SCMRevisionState.NONE) {
|
||||
baseline2 = baseline;
|
||||
} else {
|
||||
baseline2 = calcRevisionsFromBuild(project.getLastBuild(), launcher, listener);
|
||||
baseline2 = _calcRevisionsFromBuild(project.getLastBuild(), launcher, listener);
|
||||
}
|
||||
|
||||
return _compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2);
|
||||
@@ -365,14 +381,6 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
|
||||
* on BugParade for more details.
|
||||
*/
|
||||
private PollingResult _compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline2) throws IOException, InterruptedException {
|
||||
return compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains a fresh workspace of the module(s) into the specified directory
|
||||
* of the specified machine.
|
||||
|
||||
Reference in new issue
Block a user