org.opensolaris.opengrok.history
Class BazaarRepository

java.lang.Object
  extended by org.opensolaris.opengrok.history.ExternalRepository
      extended by org.opensolaris.opengrok.history.BazaarRepository

public class BazaarRepository
extends ExternalRepository

Access to a Bazaar repository.


Constructor Summary
BazaarRepository()
          Creates a new instance of BazaarRepository
BazaarRepository(java.lang.String directory)
          Creates a new instance of BazaarRepository
 
Method Summary
 Annotation annotate(java.io.File file, java.lang.String revision)
          Annotate the specified revision of a file.
 boolean fileHasHistory(java.io.File file)
           
 java.lang.String getCommand()
          Get the name of the Bazaar command that should be used
 java.lang.Class<? extends org.opensolaris.opengrok.history.HistoryParser> getDirectoryHistoryParser()
           
 java.io.InputStream getHistoryGet(java.lang.String parent, java.lang.String basename, java.lang.String rev)
          Get an input stream that I may use to read a speciffic version of a named file.
 java.lang.Class<? extends org.opensolaris.opengrok.history.HistoryParser> getHistoryParser()
          Get a parser capable of getting history log elements from this repository.
 boolean isCacheable()
          Check whether the parsed history should be cached.
 void setCommand(java.lang.String command)
          Set the name of the Bazaar command to use
 boolean supportsAnnotation()
          Checks whether this parser can annotate files.
 void update()
          Update the content in this repository by pulling the changes from the upstream repository..
 
Methods inherited from class org.opensolaris.opengrok.history.ExternalRepository
getDirectoryName, setDirectoryName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BazaarRepository

public BazaarRepository()
Creates a new instance of BazaarRepository


BazaarRepository

public BazaarRepository(java.lang.String directory)
Creates a new instance of BazaarRepository

Parameters:
directory - The directory containing the .bzr-subdirectory
Method Detail

setCommand

public void setCommand(java.lang.String command)
Set the name of the Bazaar command to use

Parameters:
command - the name of the command (bzr)

getCommand

public java.lang.String getCommand()
Get the name of the Bazaar command that should be used

Returns:
the name of the bzr command in use

getHistoryGet

public java.io.InputStream getHistoryGet(java.lang.String parent,
                                         java.lang.String basename,
                                         java.lang.String rev)
Description copied from class: ExternalRepository
Get an input stream that I may use to read a speciffic version of a named file.

Parameters:
parent - the name of the directory containing the file
basename - the name of the file to get
rev - the revision to get
Returns:
An input stream containing the correct revision.

getHistoryParser

public java.lang.Class<? extends org.opensolaris.opengrok.history.HistoryParser> getHistoryParser()
Description copied from class: ExternalRepository
Get a parser capable of getting history log elements from this repository.

Returns:
a specialized parser for this kind of repository

getDirectoryHistoryParser

public java.lang.Class<? extends org.opensolaris.opengrok.history.HistoryParser> getDirectoryHistoryParser()

annotate

public Annotation annotate(java.io.File file,
                           java.lang.String revision)
                    throws java.lang.Exception
Description copied from class: ExternalRepository
Annotate the specified revision of a file.

Parameters:
file - the file to annotate
revision - revision of the file
Returns:
an Annotation object
Throws:
java.lang.Exception - if an error occurs

supportsAnnotation

public boolean supportsAnnotation()
Description copied from class: ExternalRepository
Checks whether this parser can annotate files.

Returns:
true if annotation is supported

isCacheable

public boolean isCacheable()
Description copied from class: ExternalRepository
Check whether the parsed history should be cached.

Returns:
true if the history should be cached

update

public void update()
            throws java.lang.Exception
Description copied from class: ExternalRepository
Update the content in this repository by pulling the changes from the upstream repository..

Throws:
java.lang.Exception - if an error occurs.

fileHasHistory

public boolean fileHasHistory(java.io.File file)