logging for "git does not return any changes"

This commit is contained in:
irengrig
2009-12-07 19:17:51 +03:00
parent 912303a709
commit e7db757573
2 changed files with 21 additions and 2 deletions
@@ -310,7 +310,20 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
if (updateUnversionedFiles && !wasEverythingDirty) {
composite.cleanScope(adjustedScope);
}
actualUpdate(wasEverythingDirty, composite, builder, adjustedScope, vcs, changeListWorker, gate);
try {
actualUpdate(wasEverythingDirty, composite, builder, adjustedScope, vcs, changeListWorker, gate);
}
catch (Throwable t) {
LOG.info(t);
if (t instanceof Error) {
throw (Error) t;
} else if (t instanceof RuntimeException) {
throw (RuntimeException) t;
}
throw new RuntimeException(t);
}
if (myUpdateException != null) break;
}
@@ -15,6 +15,7 @@
*/
package git4idea.changes;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.project.Project;
@@ -35,6 +36,7 @@ import java.util.Set;
* Git repository change provider
*/
public class GitChangeProvider implements ChangeProvider {
private static final Logger LOG = Logger.getInstance("#git4idea.changes.GitChangeProvider");
/**
* the project
*/
@@ -56,7 +58,11 @@ public class GitChangeProvider implements ChangeProvider {
final ChangelistBuilder builder,
final ProgressIndicator progress,
final ChangeListManagerGate addGate) throws VcsException {
Collection<VirtualFile> roots = GitUtil.gitRootsForPaths(dirtyScope.getAffectedContentRoots());
final Collection<VirtualFile> affected = dirtyScope.getAffectedContentRoots();
Collection<VirtualFile> roots = GitUtil.gitRootsForPaths(affected);
if (roots.size() != affected.size()) {
LOG.info("affected content roots size: " + affected.size() + " roots size: " + roots.size());
}
final MyNonChangedHolder holder = new MyNonChangedHolder(myProject, dirtyScope.getDirtyFilesNoExpand());