|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensolaris.opengrok.history.HistoryGuru
public final class HistoryGuru
The HistoryGuru is used to implement an transparent layer to the various source control systems.
| Method Summary | |
|---|---|
void |
addRepositories(java.lang.String dir)
Search through the all of the directories and add all of the source repositories found. |
Annotation |
annotate(java.io.File file,
java.lang.String rev)
Annotate the specified revision of a file. |
void |
createCache()
Create the history cache for all of the repositories |
void |
createCache(java.util.List<java.lang.String> repositories)
|
void |
ensureHistoryCacheExists(java.io.File file)
Ensure that we have a directory in the cache. |
HistoryReader |
getHistoryReader(java.io.File file)
Get the appropriate history reader for the file specified by parent and basename. |
static HistoryGuru |
getInstance()
Get the one and only instance of the HistoryGuru |
protected Repository |
getRepository(java.io.File path)
|
java.io.InputStream |
getRevision(java.lang.String parent,
java.lang.String basename,
java.lang.String rev)
Get a named revision of the specified file. |
boolean |
hasAnnotation(java.io.File file)
Check if we can annotate the specified file. |
boolean |
hasHistory(java.io.File file)
Does this directory contain files with source control information? |
void |
invalidateRepositories(java.util.List<RepositoryInfo> repos)
Invalidate the current list of known repositories! |
void |
updateRepositories()
Update the source the contents in the source repositories. |
void |
updateRepositories(java.util.List<java.lang.String> paths)
Update the source the contents in the source repositories. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static HistoryGuru getInstance()
public Annotation annotate(java.io.File file,
java.lang.String rev)
throws java.io.IOException
file - the file to annotaterev - the revision to annotate (null means BASE)
null if the
HistoryParser does not support annotation
java.io.IOException
public HistoryReader getHistoryReader(java.io.File file)
throws HistoryException
file - The file to get the history reader for
HistoryException - If an error occurs while getting the history
public java.io.InputStream getRevision(java.lang.String parent,
java.lang.String basename,
java.lang.String rev)
throws java.io.IOException
parent - The directory containing the filebasename - The name of the filerev - The revision to get
java.io.IOException - If an error occurs while reading out the versionpublic boolean hasHistory(java.io.File file)
file - The name of the directory
public boolean hasAnnotation(java.io.File file)
file - the file to check
true if the file is under version control and the
version control system supports annotationpublic void addRepositories(java.lang.String dir)
dir - the root directory to start the search in.public void updateRepositories()
public void updateRepositories(java.util.List<java.lang.String> paths)
paths - A list of files/directories to updatepublic void createCache()
public void createCache(java.util.List<java.lang.String> repositories)
public void ensureHistoryCacheExists(java.io.File file)
throws HistoryException
file - the root path to test
HistoryException - if an error occurs while accessing the
history cacheprotected Repository getRepository(java.io.File path)
public void invalidateRepositories(java.util.List<RepositoryInfo> repos)
repos - The new repositories
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||