org.tigris.subversion.javahl

Class Revision

public class Revision extends Object

Class to specify a revision in a svn command.
Nested Class Summary
static classRevision.DateSpec
class to specify a revision by a date
static classRevision.Kind
Various ways of specifying revisions.
static classRevision.Number
class to specify a Revision by number
Field Summary
static RevisionBASE
base revision of working copy
static RevisionCOMMITTED
last committed revision, needs working copy
static RevisionHEAD
last commited revision
static RevisionPREVIOUS
previous committed revision, needs working copy
protected intrevKind
kind of revision specified
static RevisionSTART
first existing revision
static intSVN_INVALID_REVNUM
Marker revision number for no real revision
static RevisionWORKING
working version in working copy
Constructor Summary
Revision(int kind)
Create a new revision
protected Revision(int kind, boolean marker)
Internally create a new revision
Method Summary
booleanequals(Object target)
compare to revision objects
static RevisiongetInstance(long revisionNumber)
Creates a Revision.Number object
static RevisiongetInstance(Date revisionDate)
Creates a Revision.DateSpec objet
intgetKind()
Returns the kind of the Revsion
StringtoString()
return the textual representation of the revision

Field Detail

BASE

public static final Revision BASE
base revision of working copy

COMMITTED

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

HEAD

public static final Revision HEAD
last commited revision

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

revKind

protected int revKind
kind of revision specified

START

public static final Revision START
first existing revision

SVN_INVALID_REVNUM

public static final int SVN_INVALID_REVNUM
Marker revision number for no real revision

WORKING

public static final Revision WORKING
working version in working copy

Constructor Detail

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 differtiate from the public deprecated version

Method Detail

equals

public boolean equals(Object target)
compare to revision objects

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: IllegalArgumentException If the specified revision number is invalid.

getInstance

public static Revision getInstance(Date revisionDate)
Creates a Revision.DateSpec objet

Parameters: revisionDate the date of the new object

Returns: the new object

getKind

public int getKind()
Returns the kind of the Revsion

Returns: kind

toString

public String toString()
return the textual representation of the revision

Returns: english text