org.opensolaris.opengrok.history
Class PerforceRepository

java.lang.Object
  extended by org.opensolaris.opengrok.history.RepositoryInfo
      extended by org.opensolaris.opengrok.history.Repository
          extended by org.opensolaris.opengrok.history.PerforceRepository
All Implemented Interfaces:
java.io.Serializable

public class PerforceRepository
extends Repository

Access to a Perforce repository

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opensolaris.opengrok.history.RepositoryInfo
datePattern, directoryName, remote, type, working
 
Constructor Summary
PerforceRepository()
           
 
Method Summary
 Annotation annotate(java.io.File file, java.lang.String rev)
          Annotate the specified revision of a file.
 boolean fileHasAnnotation(java.io.File file)
          Checks whether this parser can annotate files.
static boolean isInP4Depot(java.io.File file)
          Check if a given file is in the depot
 boolean isWorking()
          Returns true if this repository is usable in this context (for SCM systems that use external binaries, the binary must be availabe etc)
 void update()
          Update the content in this repository by pulling the changes from the upstream repository..
 
Methods inherited from class org.opensolaris.opengrok.history.Repository
getDateFormat
 
Methods inherited from class org.opensolaris.opengrok.history.RepositoryInfo
getDatePattern, getDirectoryName, getType, isRemote, setDatePattern, setDirectoryName, setRemote, setType, setWorking
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerforceRepository

public PerforceRepository()
Method Detail

annotate

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

Parameters:
file - the file to annotate
rev - revision of the file
Returns:
an Annotation object
Throws:
java.io.IOException - if an error occurs

update

public void update()
            throws java.io.IOException
Description copied from class: Repository
Update the content in this repository by pulling the changes from the upstream repository..

Throws:
java.io.IOException

fileHasAnnotation

public boolean fileHasAnnotation(java.io.File file)
Description copied from class: Repository
Checks whether this parser can annotate files.

Returns:
true if annotation is supported

isInP4Depot

public static boolean isInP4Depot(java.io.File file)
Check if a given file is in the depot

Parameters:
file - The file to test
Returns:
true if the given file is in the depot, false otherwise

isWorking

public boolean isWorking()
Description copied from class: RepositoryInfo
Returns true if this repository is usable in this context (for SCM systems that use external binaries, the binary must be availabe etc)

Overrides:
isWorking in class RepositoryInfo
Returns:
true if the HistoryGuru may use the repository