[vcs]: deprecate getRepositoryForFileQuick, add one missing usage

* use this deprecated method only as a deadlock quick fix solution;
* todo: if repository not found, but vcs vf root exists, add log.warn
 and start backgroundable repository creation process instead of using
 EDT; if mappings were changed and EDT started repository constructions
 -> we should manage this properly.
This commit is contained in:
Nadya Zabrodina
2017-02-16 18:30:04 +03:00
parent b70af5dab7
commit 66e40647a0
3 changed files with 10 additions and 2 deletions
@@ -57,8 +57,12 @@ public abstract class AbstractRepositoryManager<T extends Repository>
public T getRepositoryForFile(@NotNull VirtualFile file) {
return validateAndGetRepository(myGlobalRepositoryManager.getRepositoryForFile(file));
}
/**
* @Deprecated to delete in 2017.X
*/
@Nullable
@Deprecated
public T getRepositoryForFileQuick(@NotNull VirtualFile file) {
return validateAndGetRepository(myGlobalRepositoryManager.getRepositoryForFileQuick(file));
}
@@ -94,7 +94,11 @@ public class VcsRepositoryManager extends AbstractProjectComponent implements Di
return getRepositoryForFile(file, false);
}
/**
* @Deprecated to delete in 2017.X
*/
@Nullable
@Deprecated
public Repository getRepositoryForFileQuick(@NotNull VirtualFile file) {
return getRepositoryForFile(file, true);
}
@@ -422,7 +422,7 @@ public class GithubUtil {
return repository;
}
}
return manager.getRepositoryForFile(project.getBaseDir());
return manager.getRepositoryForFileQuick(project.getBaseDir());
}
public static boolean addGithubRemote(@NotNull Project project,