dependency graph rebuild was happening too early. retrying a fix.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2373 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-03-09 02:18:06 +00:00
1 parent a054ab7c67
commit 41dddcf334
2 files changed
+12 -8

No files matched your search

@@ -263,12 +263,8 @@ public final class MavenModule extends AbstractProject<MavenModule,MavenBuild> i
Hudson.getInstance().rebuildDependencyGraph();
}
public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException {
if(!Hudson.adminCheck(req,rsp))
return;
super.doDoDelete(req, rsp);
protected void performDelete() throws IOException {
super.performDelete();
getParent().onModuleDeleted(this);
}
@@ -144,11 +144,19 @@ public abstract class AbstractItem extends Actionable implements Item {
public synchronized void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException {
if(!Hudson.adminCheck(req,rsp))
return;
Util.deleteRecursive(getRootDir());
performDelete();
if(this instanceof TopLevelItem)
Hudson.getInstance().deleteJob((TopLevelItem)this);
Hudson.getInstance().rebuildDependencyGraph();
rsp.sendRedirect2(req.getContextPath()+"/");
rsp.sendRedirect2(req.getContextPath()+"/"+getParent().getUrl());
}
/**
* Does the real job of deleting the item.
*/
protected void performDelete() throws IOException {
Util.deleteRecursive(getRootDir());
}
}