From a2a8e2c5a5023583aeb16fc4559daecc37c04fb2 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 25 Jan 2012 15:53:33 +0100 Subject: [PATCH] IDEA-79785 Perforce: do not mark file as modified when trying to Get Revision in offline mode --- .../openapi/vcs/history/FileHistoryPanelImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java index f6b02c6a7ed5..1f9bba3fa3b1 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java @@ -992,11 +992,6 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { private void getVersion(final VcsFileRevision revision) { final VirtualFile file = getVirtualFile(); final Project project = myVcs.getProject(); - if ((file != null) && !file.isWritable()) { - if (ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(file).hasReadonlyFiles()) { - return; - } - } new Task.Backgroundable(project, VcsBundle.message("show.diff.progress.title")) { @Override @@ -1034,6 +1029,12 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { public void run() { CommandProcessor.getInstance().executeCommand(project, new Runnable() { public void run() { + if (file != null && !file.isWritable()) { + if (ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(file).hasReadonlyFiles()) { + return; + } + } + try { write(revisionContent); } catch (IOException e) {