mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-83509 IntelliJ does not respond when comparing svn revision without connection
This commit is contained in:
@@ -220,6 +220,7 @@ label.working.copy.root.outside.text=Working copy root is outside the directory
|
||||
progress.text.loading.contents=Loading contents of ''{0}''
|
||||
progress.text2.revision.information=Revision {0}
|
||||
progress.title.loading.file.content=Loading Remote File Content
|
||||
progress.title.loading.file.properties=Loading Remote File Properties
|
||||
exception.text.file.miss.svn=File ''{0}'' is readonly, but miss svn:needs-lock property
|
||||
confirmation.text.edit.file=File(s) you're are going to edit needs to be locked before editing
|
||||
|
||||
|
||||
+27
-10
@@ -15,12 +15,17 @@
|
||||
*/
|
||||
package org.jetbrains.idea.svn.history;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.changes.ContentRevision;
|
||||
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.svn.SvnBundle;
|
||||
import org.jetbrains.idea.svn.SvnRevisionNumber;
|
||||
import org.jetbrains.idea.svn.SvnVcs;
|
||||
import org.jetbrains.idea.svn.actions.AbstractShowPropertiesDiffAction;
|
||||
@@ -59,18 +64,30 @@ public class SvnLazyPropertyContentRevision implements ContentRevision {
|
||||
private String loadContent() {
|
||||
final SvnVcs vcs = SvnVcs.getInstance(myProject);
|
||||
final SVNWCClient client = vcs.createWCClient();
|
||||
String list;
|
||||
try {
|
||||
list = AbstractShowPropertiesDiffAction.getPropertyList(myUrl, ((SvnRevisionNumber) myNumber).getRevision(), client);
|
||||
final Ref<String> ref = new Ref<String>();
|
||||
final Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
ref.set(AbstractShowPropertiesDiffAction.getPropertyList(myUrl, ((SvnRevisionNumber) myNumber).getRevision(), client));
|
||||
}
|
||||
catch (SVNException e) {
|
||||
// unknown node kind (node deleted)
|
||||
/*if (e.getErrorMessage().getErrorCode().getCode() == 145000) {
|
||||
return "";
|
||||
}*/
|
||||
ref.set("Can not get properties: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
if (ApplicationManager.getApplication().isDispatchThread()) {
|
||||
ProgressManager.getInstance().runProcessWithProgressSynchronously(runnable, SvnBundle.message("progress.title.loading.file.properties"),
|
||||
false, myProject);
|
||||
}
|
||||
catch (SVNException e) {
|
||||
// unknown node kind (node deleted)
|
||||
/*if (e.getErrorMessage().getErrorCode().getCode() == 145000) {
|
||||
return "";
|
||||
}*/
|
||||
list = "Can not get properties: " + e.getMessage();
|
||||
else {
|
||||
runnable.run();
|
||||
}
|
||||
return list;
|
||||
return ref.get();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user