mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-79785 Perforce: do not mark file as modified when trying to Get Revision in offline mode
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user