public interface RepositoryManager<T extends Repository>
VirtualFile
s)
and repositories
containing information and valuable methods specific for DVCS repositories.Modifier and Type | Method and Description |
---|---|
void |
addExternalRepository(VirtualFile root,
T repository)
Registers a repository which doesn't belong to the project.
|
java.util.List<T> |
getRepositories() |
T |
getRepositoryForFile(FilePath file)
Returns the
Repository which the given file belongs to, or null if the file is not under any Git ot Hg repository. |
T |
getRepositoryForFile(VirtualFile file)
Returns the
Repository which the given file belongs to, or null if the file is not under any Git or Hg repository. |
T |
getRepositoryForFileQuick(FilePath file) |
T |
getRepositoryForRoot(VirtualFile root)
Returns the Repository instance which tracks the VCS repository located in the given root directory,
or
null if the given root is not a valid registered vcs root. |
T |
getRepositoryForRootQuick(VirtualFile root) |
AbstractVcs |
getVcs() |
boolean |
isExternal(T repository) |
boolean |
isSyncEnabled()
Returns true if repositories under this repository manager are controlled synchronously.
|
boolean |
moreThanOneRoot() |
void |
removeExternalRepository(VirtualFile root)
Removes the repository not from the project, when it is not interesting anymore.
|
void |
updateAllRepositories() |
void |
updateRepository(VirtualFile root)
Synchronously updates the specified information about repository under the given root.
|
AbstractVcs getVcs()
T getRepositoryForRoot(VirtualFile root)
null
if the given root is not a valid registered vcs root.
The method checks both project roots and external roots previously registered
via addExternalRepository(VirtualFile, Repository)
.boolean isExternal(T repository)
T getRepositoryForFile(VirtualFile file)
Repository
which the given file belongs to, or null
if the file is not under any Git or Hg repository.T getRepositoryForFile(FilePath file)
Repository
which the given file belongs to, or null
if the file is not under any Git ot Hg repository.T getRepositoryForRootQuick(VirtualFile root)
java.util.List<T> getRepositories()
void addExternalRepository(VirtualFile root, T repository)
void removeExternalRepository(VirtualFile root)
boolean moreThanOneRoot()
void updateRepository(VirtualFile root)
root
- root directory of the vcs repository.void updateAllRepositories()
boolean isSyncEnabled()