don't readExternal the restore update tree in tests

This commit is contained in:
Dmitry Jemerov
2009-09-15 18:07:44 +04:00
parent 014ef3b9d6
commit b8d5aff7f2
@@ -42,6 +42,7 @@ import com.intellij.openapi.util.WriteExternalException;
import com.intellij.openapi.vcs.VcsBundle;
import com.intellij.openapi.vcs.changes.committed.CommittedChangesCache;
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx;
import com.intellij.openapi.application.ApplicationManager;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
@@ -88,11 +89,13 @@ public class RestoreUpdateTree implements ProjectComponent, JDOMExternalizable {
}
public void readExternal(Element element) throws InvalidDataException {
Element child = element.getChild(UPDATE_INFO);
if (child != null) {
UpdateInfo updateInfo = new UpdateInfo(myProject);
updateInfo.readExternal(child);
myUpdateInfo = updateInfo;
if (!ApplicationManager.getApplication().isUnitTestMode()) {
Element child = element.getChild(UPDATE_INFO);
if (child != null) {
UpdateInfo updateInfo = new UpdateInfo(myProject);
updateInfo.readExternal(child);
myUpdateInfo = updateInfo;
}
}
}