set-parent-project: evict child projects from project cache

When a project gets reparented it's not evicted from the project cache
and the cached project instance still points to the old parent
project.

Due to this e.g. the 'ls-projects --tree' command delivers incorrect
results right after a project was reparented with the
'set-project-parent' command.

Change-Id: If64f46688a2a03ffed6bb67ca8161bb16e9bb59a
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2011-09-15 14:48:56 +02:00
parent 813123b520
commit c6487ef556

View File

@@ -132,6 +132,8 @@ final class AdminSetParent extends BaseCommand {
} catch (ConfigInvalidException e) {
throw new Failure(1, "Cannot update project " + name, e);
}
projectCache.evict(pc.getProject());
}
if (err.length() > 0) {