summaryrefslogtreecommitdiff
path: root/platform/vcs-impl/src/com/intellij/openapi/vcs
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-05-08 15:46:07 -0700
committerTor Norbye <tnorbye@google.com>2013-05-08 15:46:07 -0700
commita6eac331b3d9f0d4168b12356ea256c83f4e9c05 (patch)
tree923ceb497c43ea183351321bb4b9e388851a7854 /platform/vcs-impl/src/com/intellij/openapi/vcs
parent934b9431b0b827a132df794e307fe5a2b70de00b (diff)
downloadidea-a6eac331b3d9f0d4168b12356ea256c83f4e9c05.tar.gz
Snapshot f5ae6e3be7e12e1ef9e12f48fe3a674266288e4e from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: I756af70fb2910aa2687e94e28338fb9727bce518
Diffstat (limited to 'platform/vcs-impl/src/com/intellij/openapi/vcs')
-rw-r--r--platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyScopeManagerImpl.java14
-rw-r--r--platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java12
2 files changed, 14 insertions, 12 deletions
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyScopeManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyScopeManagerImpl.java
index a5d4a011ae42..70127c36ed97 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyScopeManagerImpl.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsDirtyScopeManagerImpl.java
@@ -105,7 +105,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
if ((! myProject.isOpen()) || myProject.isDisposed() || myVcsManager.getAllActiveVcss().length == 0) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("everything dirty: " + ReflectionUtil.getCallerClass(1));
+ LOG.debug("everything dirty: " + ReflectionUtil.findCallerClass(1));
}
final LifeDrop lifeDrop = myLife.doIfAlive(new Runnable() {
@@ -169,7 +169,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
if (! haveStuff) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("paths dirty: " + filesConverted + "; " + dirsConverted + "; " + ReflectionUtil.getCallerClass(2));
+ LOG.debug("paths dirty: " + filesConverted + "; " + dirsConverted + "; " + ReflectionUtil.findCallerClass(2));
}
takeDirt(new Consumer<DirtBuilder>() {
@@ -231,7 +231,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
if (! haveStuff) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("files dirty: " + filesConverted + "; " + dirsConverted + "; " + ReflectionUtil.getCallerClass(2));
+ LOG.debug("files dirty: " + filesConverted + "; " + dirsConverted + "; " + ReflectionUtil.findCallerClass(2));
}
takeDirt(new Consumer<DirtBuilder>() {
@@ -257,7 +257,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
final AbstractVcs vcs = myGuess.getVcsForDirty(file);
if (vcs == null) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("file dirty: " + file + "; " + ReflectionUtil.getCallerClass(2));
+ LOG.debug("file dirty: " + file + "; " + ReflectionUtil.findCallerClass(2));
}
final VcsRoot root = new VcsRoot(vcs, file);
takeDirt(new Consumer<DirtBuilder>() {
@@ -274,7 +274,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
final AbstractVcs vcs = myGuess.getVcsForDirty(file);
if (vcs == null) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("file dirty: " + file + "; " + ReflectionUtil.getCallerClass(1));
+ LOG.debug("file dirty: " + file + "; " + ReflectionUtil.findCallerClass(1));
}
final FilePathUnderVcs root = new FilePathUnderVcs(file, vcs);
takeDirt(new Consumer<DirtBuilder>() {
@@ -295,7 +295,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
final AbstractVcs vcs = myGuess.getVcsForDirty(dir);
if (vcs == null) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("dir dirty recursively: " + dir + "; " + ReflectionUtil.getCallerClass(2));
+ LOG.debug("dir dirty recursively: " + dir + "; " + ReflectionUtil.findCallerClass(2));
}
final VcsRoot root = new VcsRoot(vcs, dir);
takeDirt(new Consumer<DirtBuilder>() {
@@ -312,7 +312,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
final AbstractVcs vcs = myGuess.getVcsForDirty(path);
if (vcs == null) return;
if (LOG.isDebugEnabled()) {
- LOG.debug("dir dirty recursively: " + path + "; " + ReflectionUtil.getCallerClass(2));
+ LOG.debug("dir dirty recursively: " + path + "; " + ReflectionUtil.findCallerClass(2));
}
final FilePathUnderVcs root = new FilePathUnderVcs(path, vcs);
takeDirt(new Consumer<DirtBuilder>() {
diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java
index 9c621d0cdef8..d2c7b556b88e 100644
--- a/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java
+++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/update/AbstractCommonUpdateAction.java
@@ -24,10 +24,7 @@ import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.options.Configurable;
-import com.intellij.openapi.progress.ProcessCanceledException;
-import com.intellij.openapi.progress.ProgressIndicator;
-import com.intellij.openapi.progress.ProgressManager;
-import com.intellij.openapi.progress.Task;
+import com.intellij.openapi.progress.*;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ex.ProjectManagerEx;
import com.intellij.openapi.ui.MessageType;
@@ -110,7 +107,12 @@ public abstract class AbstractCommonUpdateAction extends AbstractVcsAction {
ApplicationManager.getApplication().saveAll();
}
Task.Backgroundable task = new Updater(project, roots, vcsToVirtualFiles);
- ProgressManager.getInstance().run(task);
+ if (ApplicationManager.getApplication().isUnitTestMode()) {
+ task.run(new EmptyProgressIndicator());
+ }
+ else {
+ ProgressManager.getInstance().run(task);
+ }
}
catch (ProcessCanceledException e1) {
//ignore