From a2a5c00b2fbebc2f3ec364e73d4da7ef7c2f4cd7 Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Fri, 12 Aug 2016 16:53:02 +0300 Subject: [PATCH] [patch]: move refresh right before loading patch content * not in EDT; * support changed patch file content outside project dir between dialog showing; --- .../vcs/changes/patch/ApplyPatchDifferentiatedDialog.java | 1 + .../openapi/vcs/changes/shelf/UnshelveWithDialogAction.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java index e0fd55451484..17b80796250a 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java @@ -398,6 +398,7 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper { private static PatchReader loadPatches(@NotNull VirtualFile patchFile) { PatchReader reader; try { + patchFile.refresh(false, false); reader = PatchVirtualFileReader.create(patchFile); } catch (IOException e) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/UnshelveWithDialogAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/UnshelveWithDialogAction.java index 821c4c8a3fff..ee0d166ec0b6 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/UnshelveWithDialogAction.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/UnshelveWithDialogAction.java @@ -71,7 +71,6 @@ public class UnshelveWithDialogAction extends DumbAwareAction { VcsBalloonProblemNotifier.showOverChangesView(project, "Can not find path file", MessageType.ERROR); return; } - virtualFile.refresh(false, false); List binaryShelvedPatches = ContainerUtil.map(changeList.getBinaryFiles(), ShelvedBinaryFilePatch::new); final ApplyPatchDifferentiatedDialog dialog =