Class Status

java.lang.Object
org.tigris.subversion.javahl.Status
All Implemented Interfaces:
java.io.Serializable

public class Status extends java.lang.Object implements java.io.Serializable
Subversion status API. This describes the status of one subversion item (file or directory) in the working copy. Will be returned by SVNClient.status or SVNClient.singleStatus
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    class for kind status of the item or its properties the constants are defined in the interface StatusKind for building reasons
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private java.lang.String
     
     
    private java.lang.String
    if there is a conflict, the filename of the new version from the repository
    private java.lang.String
    if there is a conflict, the filename of the common base version from the repository
    private java.lang.String
    if there is a conflict, the filename of the former working copy version
    private boolean
    has this item be copied from another item
    private boolean
    has the item is a file external
    private long
    the last date the item was changed before base (represented in microseconds since the epoch)
    private long
    the last revision the item was changed before base
    private java.lang.String
    the last author of the last change before base
    private java.lang.String
     
    private long
     
    private boolean
    flag is this item is locked locally by subversion (running or aborted operation)
    private java.lang.String
     
    private java.lang.String
     
    private int
    kind of the item (file, directory or unknonw)
    private java.lang.String
    the path in the working copy
    private int
    the status of the properties (See StatusKind)
    private int
    the status of the properties base (See StatusKind)
    private int
    the file or directory status of base (See StatusKind)
    private int
     
    private java.lang.String
     
    private long
     
    private long
     
    private Lock
     
    private long
    the base revision of the working copy
    private long
    if copied, the revision number of the copy source
    private static final long
     
    private boolean
    has the url of the item be switch
    private int
    the file or directory status (See StatusKind)
    private boolean
     
    private java.lang.String
    the url for accessing the item
    private java.lang.String
    if copied, the url of the copy source
  • Constructor Summary

    Constructors
    Constructor
    Description
    Status(java.lang.String path)
    Create an empty status struct
    Status(java.lang.String path, java.lang.String url, int nodeKind, long revision, long lastChangedRevision, long lastChangedDate, java.lang.String lastCommitAuthor, int textStatus, int propStatus, int repositoryTextStatus, int repositoryPropStatus, boolean locked, boolean copied, boolean treeConflicted, ConflictDescriptor conflictDescriptor, java.lang.String conflictOld, java.lang.String conflictNew, java.lang.String conflictWorking, java.lang.String urlCopiedFrom, long revisionCopiedFrom, boolean switched, boolean fileExternal, java.lang.String lockToken, java.lang.String lockOwner, java.lang.String lockComment, long lockCreationDate, Lock reposLock, long reposLastCmtRevision, long reposLastCmtDate, int reposKind, java.lang.String reposLastCmtAuthor, java.lang.String changelist)
    this constructor should only called from JNI code
    Status(SVNClient aClient, Status aStatus)
    A backward-compat wrapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    private static int
     
    java.lang.String
     
     
    java.lang.String
    Returns in case of conflict, the filename of the most recent repository version
    java.lang.String
    Returns in case of conflict, the filename of the common base version
    java.lang.String
    Returns in case of conflict, the filename of the former working copy version
    java.util.Date
    Returns the last date the item was changed or null
    long
    Returns the last date the item was changed measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.
    Returns the last revision the file was changed as a Revision object
    long
    Returns the last revision the file was changed as a long integer
    java.lang.String
    Returns the author of the last changed or null
    java.lang.String
    Returns the lock comment
    java.util.Date
    Returns the lock creation date
    long
    Returns the lock creation date measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.
    java.lang.String
    Returns the lock owner
    java.lang.String
    Returns the lock token
    int
    Returns the kind of the node (file, directory or unknown, see NodeKind)
    java.lang.String
    Returns the file system path of the item
    int
    Returns the status of the properties (See Status Kind)
    java.lang.String
    Returns the status of the properties as text
    int
    Returns test status of the properties in the repository (See StatusKind)
    int
    Returns the status of the item in the repository (See StatusKind)
    int
     
    java.lang.String
     
    java.util.Date
     
    long
    Return the last committed date measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.
     
    long
     
    Returns the lock as in the repository
    Returns the revision as a Revision object
    Returns if copied the source revision as a Revision object
    long
    Returns if copied the source revision as s long integer
    long
    Returns the revision as a long integer
    int
    Returns the status of the item (See StatusKind)
    java.lang.String
    Returns the status of the item as text.
    java.lang.String
    Returns the URI to where the item might exist in the repository.
    java.lang.String
    Returns if copied the copy source url or null
    boolean
    Returns if the resource has a remote counter-part
    boolean
     
    boolean
    Returns if the resource just has been added
    boolean
    Returns if the item has been copied
    boolean
    Returns if the resource is schedules for delete
    boolean
    Returns if the item is a file external
    boolean
    Returns if the resource is ignored by svn (only returned if noIgnore is set on SVNClient.list)
    boolean
    Returns if the item is locked (running or aborted subversion operation)
    boolean
    Returns if is managed by svn (added, normal, modified ...)
    boolean
    Returns if the resource has been merged
    boolean
    Returns if the resource itself is modified
    boolean
    Returns if the repository url has been switched
    private static java.util.Date
    microsecondsToDate(long micros)
    Converts microseconds since the epoch to a Date object.
    private void
    populateFromInfo(SVNClient aClient, java.lang.String path)
     
    (package private) void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • url

      private java.lang.String url
      the url for accessing the item
    • path

      private java.lang.String path
      the path in the working copy
    • nodeKind

      private int nodeKind
      kind of the item (file, directory or unknonw)
    • revision

      private long revision
      the base revision of the working copy
    • lastChangedRevision

      private long lastChangedRevision
      the last revision the item was changed before base
    • lastChangedDate

      private long lastChangedDate
      the last date the item was changed before base (represented in microseconds since the epoch)
    • lastCommitAuthor

      private java.lang.String lastCommitAuthor
      the last author of the last change before base
    • textStatus

      private int textStatus
      the file or directory status (See StatusKind)
    • propStatus

      private int propStatus
      the status of the properties (See StatusKind)
    • locked

      private boolean locked
      flag is this item is locked locally by subversion (running or aborted operation)
    • copied

      private boolean copied
      has this item be copied from another item
    • switched

      private boolean switched
      has the url of the item be switch
    • fileExternal

      private boolean fileExternal
      has the item is a file external
    • treeConflicted

      private boolean treeConflicted
      Since:
      1.6 is this item in a tree conflicted state
    • conflictDescriptor

      private ConflictDescriptor conflictDescriptor
      Since:
      1.6 description of the tree conflict
    • repositoryTextStatus

      private int repositoryTextStatus
      the file or directory status of base (See StatusKind)
    • repositoryPropStatus

      private int repositoryPropStatus
      the status of the properties base (See StatusKind)
    • conflictNew

      private java.lang.String conflictNew
      if there is a conflict, the filename of the new version from the repository
    • conflictOld

      private java.lang.String conflictOld
      if there is a conflict, the filename of the common base version from the repository
    • conflictWorking

      private java.lang.String conflictWorking
      if there is a conflict, the filename of the former working copy version
    • urlCopiedFrom

      private java.lang.String urlCopiedFrom
      if copied, the url of the copy source
    • revisionCopiedFrom

      private long revisionCopiedFrom
      if copied, the revision number of the copy source
    • lockToken

      private java.lang.String lockToken
      Since:
      1.2 token specified for the lock (null if not locked)
    • lockOwner

      private java.lang.String lockOwner
      Since:
      1.2 owner of the lock (null if not locked)
    • lockComment

      private java.lang.String lockComment
      Since:
      1.2 comment specified for the lock (null if not locked)
    • lockCreationDate

      private long lockCreationDate
      Since:
      1.2 date of the creation of the lock (represented in microseconds since the epoch)
    • reposLock

      private Lock reposLock
      Since:
      1.2 the lock in the repository
    • reposLastCmtRevision

      private long reposLastCmtRevision
      Since:
      1.3 Set to the youngest committed revision, or Revision.SVN_INVALID_REVNUM if not out of date.
    • reposLastCmtDate

      private long reposLastCmtDate
      Since:
      1.3 Set to the most recent commit date, or 0 if not out of date.
    • reposKind

      private int reposKind
      Since:
      1.3 Set to the node kind of the youngest commit, or NodeKind.none if not out of date.
    • reposLastCmtAuthor

      private java.lang.String reposLastCmtAuthor
      Since:
      1.3 Set to the user name of the youngest commit, or null if not out of date.
    • changelist

      private java.lang.String changelist
      Since:
      1.5 Set to the changelist of the item, or null if not under version control.
  • Constructor Details

    • Status

      public Status(java.lang.String path, java.lang.String url, int nodeKind, long revision, long lastChangedRevision, long lastChangedDate, java.lang.String lastCommitAuthor, int textStatus, int propStatus, int repositoryTextStatus, int repositoryPropStatus, boolean locked, boolean copied, boolean treeConflicted, ConflictDescriptor conflictDescriptor, java.lang.String conflictOld, java.lang.String conflictNew, java.lang.String conflictWorking, java.lang.String urlCopiedFrom, long revisionCopiedFrom, boolean switched, boolean fileExternal, java.lang.String lockToken, java.lang.String lockOwner, java.lang.String lockComment, long lockCreationDate, Lock reposLock, long reposLastCmtRevision, long reposLastCmtDate, int reposKind, java.lang.String reposLastCmtAuthor, java.lang.String changelist)
      this constructor should only called from JNI code
      Parameters:
      path - the file system path of item
      url - the url of the item
      nodeKind - kind of item (directory, file or unknown
      revision - the revision number of the base
      lastChangedRevision - the last revision this item was changed
      lastChangedDate - the last date this item was changed
      lastCommitAuthor - the author of the last change
      textStatus - the file or directory status (See StatusKind)
      propStatus - the property status (See StatusKind)
      repositoryTextStatus - the file or directory status of the base
      repositoryPropStatus - the property status of the base
      locked - if the item is locked (running or aborted operation)
      copied - if the item is copy
      treeConflicted - if the item is part of a tree conflict
      conflictDescriptor - the description of the tree conflict
      conflictOld - in case of conflict, the file name of the the common base version
      conflictNew - in case of conflict, the file name of new repository version
      conflictWorking - in case of conflict, the file name of the former working copy version
      urlCopiedFrom - if copied, the url of the copy source
      revisionCopiedFrom - if copied, the revision number of the copy source
      switched - flag if the node has been switched in the path
      fileExternal - flag if the node is a file external
      lockToken - the token for the current lock if any
      lockOwner - the owner of the current lock is any
      lockComment - the comment of the current lock if any
      lockCreationDate - the date, the lock was created if any
      reposLock - the lock as stored in the repository if any
      reposLastCmtRevision - the youngest revision, if out of date
      reposLastCmtDate - the last commit date, if out of date
      reposKind - the kind of the youngest revision, if out of date
      reposLastCmtAuthor - the author of the last commit, if out of date
      changelist - the changelist the item is a member of
    • Status

      public Status(java.lang.String path)
      Create an empty status struct
    • Status

      public Status(SVNClient aClient, Status aStatus)
      A backward-compat wrapper.
  • Method Details

    • populateFromInfo

      private void populateFromInfo(SVNClient aClient, java.lang.String path) throws ClientException
      Throws:
      ClientException
    • populateLocalLock

      void populateLocalLock(Lock aLock)
    • getPath

      public java.lang.String getPath()
      Returns the file system path of the item
      Returns:
      path of status entry
    • getRevision

      public Revision.Number getRevision()
      Returns the revision as a Revision object
      Returns:
      revision if versioned, otherwise SVN_INVALID_REVNUM
    • getRevisionNumber

      public long getRevisionNumber()
      Returns the revision as a long integer
      Returns:
      revision if versioned, otherwise SVN_INVALID_REVNUM
    • getLastChangedDate

      public java.util.Date getLastChangedDate()
      Returns the last date the item was changed or null
      Returns:
      the last time the item was changed or null if not available
    • getLastChangedDateMicros

      public long getLastChangedDateMicros()
      Returns the last date the item was changed measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.
      Returns:
      the last time the item was changed.
      Since:
      1.5
    • getLastCommitAuthor

      public java.lang.String getLastCommitAuthor()
      Returns the author of the last changed or null
      Returns:
      name of author if versioned, null otherwise
    • getTextStatus

      public int getTextStatus()
      Returns the status of the item (See StatusKind)
      Returns:
      file status property enum of the "textual" component.
    • getTextStatusDescription

      public java.lang.String getTextStatusDescription()
      Returns the status of the item as text.
      Returns:
      english text
    • getPropStatus

      public int getPropStatus()
      Returns the status of the properties (See Status Kind)
      Returns:
      file status property enum of the "property" component.
    • getPropStatusDescription

      public java.lang.String getPropStatusDescription()
      Returns the status of the properties as text
      Returns:
      english text
    • getRepositoryTextStatus

      public int getRepositoryTextStatus()
      Returns the status of the item in the repository (See StatusKind)
      Returns:
      file status property enum of the "textual" component in the repository.
    • getRepositoryPropStatus

      public int getRepositoryPropStatus()
      Returns test status of the properties in the repository (See StatusKind)
      Returns:
      file status property enum of the "property" component im the repository.
    • isLocked

      public boolean isLocked()
      Returns if the item is locked (running or aborted subversion operation)
      Returns:
      true if locked
    • isCopied

      public boolean isCopied()
      Returns if the item has been copied
      Returns:
      true if copied
    • getConflictNew

      public java.lang.String getConflictNew()
      Returns in case of conflict, the filename of the most recent repository version
      Returns:
      the filename of the most recent repository version
    • getConflictOld

      public java.lang.String getConflictOld()
      Returns in case of conflict, the filename of the common base version
      Returns:
      the filename of the common base version
    • getConflictWorking

      public java.lang.String getConflictWorking()
      Returns in case of conflict, the filename of the former working copy version
      Returns:
      the filename of the former working copy version
    • getUrl

      public java.lang.String getUrl()
      Returns the URI to where the item might exist in the repository. We say "might" because the item might exist in your working copy, but have been deleted from the repository. Or it might exist in the repository, but your working copy might not yet contain it (because the WC is not up to date).
      Returns:
      URI in repository, or null if the item exists in neither the repository nor the WC.
    • getLastChangedRevision

      public Revision.Number getLastChangedRevision()
      Returns the last revision the file was changed as a Revision object
      Returns:
      last changed revision
    • getLastChangedRevisionNumber

      public long getLastChangedRevisionNumber()
      Returns the last revision the file was changed as a long integer
      Returns:
      last changed revision
    • getNodeKind

      public int getNodeKind()
      Returns the kind of the node (file, directory or unknown, see NodeKind)
      Returns:
      the node kind
    • getUrlCopiedFrom

      public java.lang.String getUrlCopiedFrom()
      Returns if copied the copy source url or null
      Returns:
      the source url
    • getRevisionCopiedFrom

      public Revision.Number getRevisionCopiedFrom()
      Returns if copied the source revision as a Revision object
      Returns:
      the source revision
    • getRevisionCopiedFromNumber

      public long getRevisionCopiedFromNumber()
      Returns if copied the source revision as s long integer
      Returns:
      the source revision
    • isSwitched

      public boolean isSwitched()
      Returns if the repository url has been switched
      Returns:
      is the item has been switched
    • isFileExternal

      public boolean isFileExternal()
      Returns if the item is a file external
      Returns:
      is the item is a file external
    • isManaged

      public boolean isManaged()
      Returns if is managed by svn (added, normal, modified ...)
      Returns:
      if managed by svn
    • hasRemote

      public boolean hasRemote()
      Returns if the resource has a remote counter-part
      Returns:
      has version in repository
    • isAdded

      public boolean isAdded()
      Returns if the resource just has been added
      Returns:
      if added
    • isDeleted

      public boolean isDeleted()
      Returns if the resource is schedules for delete
      Returns:
      if deleted
    • isMerged

      public boolean isMerged()
      Returns if the resource has been merged
      Returns:
      if merged
    • isIgnored

      public boolean isIgnored()
      Returns if the resource is ignored by svn (only returned if noIgnore is set on SVNClient.list)
      Returns:
      if ignore
    • isModified

      public boolean isModified()
      Returns if the resource itself is modified
      Returns:
      if modified
    • getLockToken

      public java.lang.String getLockToken()
      Returns the lock token
      Returns:
      the lock token
      Since:
      1.2
    • getLockOwner

      public java.lang.String getLockOwner()
      Returns the lock owner
      Returns:
      the lock owner
      Since:
      1.2
    • getLockComment

      public java.lang.String getLockComment()
      Returns the lock comment
      Returns:
      the lock comment
      Since:
      1.2
    • getLockCreationDate

      public java.util.Date getLockCreationDate()
      Returns the lock creation date
      Returns:
      the lock creation date
      Since:
      1.2
    • getLockCreationDateMicros

      public long getLockCreationDateMicros()
      Returns the lock creation date measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.
      Returns:
      the lock creation date
      Since:
      1.5
    • getReposLock

      public Lock getReposLock()
      Returns the lock as in the repository
      Returns:
      the lock as in the repository
      Since:
      1.2
    • getReposLastCmtRevision

      public Revision.Number getReposLastCmtRevision()
      Returns:
      The last committed revision, or Revision.SVN_INVALID_REVNUM if up to date.
      Since:
      1.3
    • getReposLastCmtRevisionNumber

      public long getReposLastCmtRevisionNumber()
      Returns:
      The last committed revision as a long integer, or -1 if up to date.
      Since:
      1.3
    • getReposLastCmtDate

      public java.util.Date getReposLastCmtDate()
      Returns:
      The last committed date, or null if up to date.
      Since:
      1.3
    • getReposLastCmtDateMicros

      public long getReposLastCmtDateMicros()
      Return the last committed date measured in the number of microseconds since 00:00:00 January 1, 1970 UTC.
      Returns:
      the last committed date
      Since:
      1.5
    • getReposKind

      public int getReposKind()
      Returns:
      The node kind (e.g. file, directory, etc.), or null if up to date.
      Since:
      1.3
    • getReposLastCmtAuthor

      public java.lang.String getReposLastCmtAuthor()
      Returns:
      The author of the last commit, or null if up to date.
      Since:
      1.3
    • getChangelist

      public java.lang.String getChangelist()
      Returns:
      the changelist name
      Since:
      1.5
    • hasTreeConflict

      public boolean hasTreeConflict()
      Returns:
      the tree conflicted state
      Since:
      1.6
    • getConflictDescriptor

      public ConflictDescriptor getConflictDescriptor()
      Returns:
      the conflict descriptor for the tree conflict
      Since:
      1.6
    • microsecondsToDate

      private static java.util.Date microsecondsToDate(long micros)
      Converts microseconds since the epoch to a Date object.
      Parameters:
      micros - Microseconds since the epoch.
      Returns:
      A Date object, or null if micros was zero.
    • fromAStatusKind

      private static int fromAStatusKind(Status.Kind aKind)