Class Revision

java.lang.Object
org.tigris.subversion.javahl.Revision
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Revision.DateSpec, Revision.Number

public class Revision extends java.lang.Object implements java.io.Serializable
Class to specify a revision in a svn command.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    class to specify a revision by a date
    static final class 
    Various ways of specifying revisions.
    static class 
    class to specify a Revision by number
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Revision
    base revision of working copy
    static final Revision
    last committed revision, needs working copy
    static final Revision
    last committed revision
    static final Revision
    previous committed revision, needs working copy
    protected int
    kind of revision specified
    private static final long
     
    static final Revision
    first existing revision
    static final int
    Marker revision number for no real revision
    static final Revision
    working version in working copy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Revision(int kind)
    Deprecated. 
    protected
    Revision(int kind, boolean marker)
    Internally create a new revision
  • Method Summary

    Modifier and Type
    Method
    Description
    static Revision
     
    (package private) static Revision.Number
    createNumber(long revNumber)
    Factory which creates #Number objects for valid revision numbers only (those greater than zero).
    boolean
    equals(java.lang.Object target)
    compare to revision objects
    static Revision
    getInstance(long revisionNumber)
    Creates a Revision.Number object
    static Revision
    getInstance(java.util.Date revisionDate)
    Creates a Revision.DateSpec objet
    int
    Returns the kind of the Revsion
    int
     
     
    java.lang.String
    return the textual representation of the revision

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • revKind

      protected int revKind
      kind of revision specified
    • START

      public static final Revision START
      first existing revision
    • COMMITTED

      public static final Revision COMMITTED
      last committed revision, needs working copy
    • PREVIOUS

      public static final Revision PREVIOUS
      previous committed revision, needs working copy
    • BASE

      public static final Revision BASE
      base revision of working copy
    • WORKING

      public static final Revision WORKING
      working version in working copy
    • SVN_INVALID_REVNUM

      public static final int SVN_INVALID_REVNUM
      Marker revision number for no real revision
      See Also:
  • Constructor Details

    • Revision

      public Revision(int kind)
      Deprecated.
      Create a new revision
      Parameters:
      kind - kind of revision
    • Revision

      protected Revision(int kind, boolean marker)
      Internally create a new revision
      Parameters:
      kind - kind of revision
      marker - marker to differentiate from the public deprecated version
  • Method Details

    • getKind

      public int getKind()
      Returns the kind of the Revsion
      Returns:
      kind
    • toString

      public java.lang.String toString()
      return the textual representation of the revision
      Overrides:
      toString in class java.lang.Object
      Returns:
      english text
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals(java.lang.Object target)
      compare to revision objects
      Overrides:
      equals in class java.lang.Object
      Parameters:
      target -
      Returns:
      if both object have equal content
    • getInstance

      public static Revision getInstance(long revisionNumber)
      Creates a Revision.Number object
      Parameters:
      revisionNumber - the revision number of the new object
      Returns:
      the new object
      Throws:
      java.lang.IllegalArgumentException - If the specified revision number is invalid.
    • createNumber

      static Revision.Number createNumber(long revNumber)
      Factory which creates #Number objects for valid revision numbers only (those greater than zero). For internal usage to avoid an IllegalArgumentException, where no external consumer of the javahl API passed an invalid revision number.
      Parameters:
      revNumber - The revision number to create an object for.
      Returns:
      An object representing revNumber, or null if the revision number was invalid.
      Since:
      1.2
    • getInstance

      public static Revision getInstance(java.util.Date revisionDate)
      Creates a Revision.DateSpec objet
      Parameters:
      revisionDate - the date of the new object
      Returns:
      the new object
    • toApache

      public Revision toApache()
    • createFromApache

      public static Revision createFromApache(Revision aRev)