From b8d5aff7f2df58fd4996f22ed469f7e3a2d80fd6 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 15 Sep 2009 18:07:44 +0400 Subject: [PATCH] don't readExternal the restore update tree in tests --- .../openapi/vcs/update/RestoreUpdateTree.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/RestoreUpdateTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/RestoreUpdateTree.java index 14e8ae9fc2fa..44be6fe74ce9 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/RestoreUpdateTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/RestoreUpdateTree.java @@ -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; + } } }