提交 95410cea 编写于 作者: K kohsuke

follow up change to hide internal state.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4688 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6109e076
...@@ -97,7 +97,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A ...@@ -97,7 +97,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
/** /**
* True to suspend new builds. * True to suspend new builds.
*/ */
public boolean disabled; protected boolean disabled;
/** /**
* Identifies {@link JDK} to be used. * Identifies {@link JDK} to be used.
...@@ -228,6 +228,14 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A ...@@ -228,6 +228,14 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return disabled; return disabled;
} }
/**
* Marks the build as disabled.
*/
public void makeDisabled(boolean b) throws IOException {
this.disabled = b;
save();
}
@Override @Override
public BallColor getIconColor() { public BallColor getIconColor() {
if(isDisabled()) if(isDisabled())
......
...@@ -336,7 +336,7 @@ public class SubversionSCM extends SCM implements Serializable { ...@@ -336,7 +336,7 @@ public class SubversionSCM extends SCM implements Serializable {
private List<String> checkout(AbstractBuild build, FilePath workspace, TaskListener listener) throws IOException, InterruptedException { private List<String> checkout(AbstractBuild build, FilePath workspace, TaskListener listener) throws IOException, InterruptedException {
if (projectDeleted(listener)) { if (projectDeleted(listener)) {
// Disable this project, see issue #763 // Disable this project, see issue #763
build.getProject().disabled = true; build.getProject().makeDisabled(true);
return null; return null;
} }
Boolean isUpdatable = useUpdate && workspace.act(new IsUpdatableTask(this, listener)); Boolean isUpdatable = useUpdate && workspace.act(new IsUpdatableTask(this, listener));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册