From 5b14cf2443c41913d43b8fe9dd0b36f7f79cef67 Mon Sep 17 00:00:00 2001 From: Irina Chernushina Date: Tue, 11 Aug 2009 15:18:25 +0400 Subject: [PATCH] VCS: show diff actions -> backgroundable, disable corresponding action for corresponding file while background action is in progress --- .../org/jetbrains/idea/svn/history/SvnHistoryProvider.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java index db8e4c59b3..278d5531e6 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnHistoryProvider.java @@ -47,10 +47,7 @@ import org.jetbrains.idea.svn.actions.ShowAllSubmittedFilesAction; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.internal.util.SVNPathUtil; import org.tmatesoft.svn.core.internal.wc.SVNErrorManager; -import org.tmatesoft.svn.core.wc.SVNInfo; -import org.tmatesoft.svn.core.wc.SVNLogClient; -import org.tmatesoft.svn.core.wc.SVNRevision; -import org.tmatesoft.svn.core.wc.SVNWCClient; +import org.tmatesoft.svn.core.wc.*; import org.tmatesoft.svn.util.SVNLogType; import javax.swing.*; @@ -234,6 +231,14 @@ public class SvnHistoryProvider implements VcsHistoryProvider { final ArrayList result, final Ref supports15Ref) throws SVNException { SVNWCClient wcClient = myVcs.createWCClient(); SVNInfo info = wcClient.doInfo(new File(file.getIOFile().getAbsolutePath()), SVNRevision.WORKING); + wcClient.setEventHandler(new ISVNEventHandler() { + public void handleEvent(SVNEvent event, double progress) throws SVNException { + } + + public void checkCancelled() throws SVNCancelException { + indicator.checkCanceled(); + } + }); if (info == null || info.getRepositoryRootURL() == null) { exception[0] = new SVNException(SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "File ''{0}'' is not under version control", file.getIOFile())); return; -- 2.11.4.GIT