Package org.tmatesoft.svn.core
Class SVNLogEntry
- java.lang.Object
-
- org.tmatesoft.svn.core.SVNLogEntry
-
- All Implemented Interfaces:
java.io.Serializable
public class SVNLogEntry extends java.lang.Object implements java.io.Serializable
The SVNLogEntry class encapsulates such per revision information as: a revision number, the datestamp when the revision was committed, the author of the revision, a commit log message and all paths changed in that revision.- Since:
- 1.2
- Version:
- 1.3
- See Also:
SVNLogEntryPath
,ISVNLogEntryHandler
, Examples, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SVNLogEntry
EMPTY_ENTRY
This is a log entry children stop marker use by theSVNKit
internals.private java.util.Map
myChangedPaths
private boolean
myHasChildren
private boolean
myIsNonInheritable
private boolean
myIsSubtractiveMerge
private long
myRevision
private SVNProperties
myRevisionProperties
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SVNLogEntry(java.util.Map changedPaths, long revision, java.lang.String author, java.util.Date date, java.lang.String message)
Constructs an SVNLogEntry object.SVNLogEntry(java.util.Map changedPaths, long revision, SVNProperties revisionProperties, boolean hasChildren)
Constructs an SVNLogEntry object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
compare(java.lang.Object o1, java.lang.Object o2)
Compares two objects.boolean
equals(java.lang.Object obj)
Compares this object with another one.java.lang.String
getAuthor()
Returns the author of the revision that this object represents.java.util.Map<java.lang.String,SVNLogEntryPath>
getChangedPaths()
Gets a map containing all the paths that were changed in the revision that this object represents.java.util.Date
getDate()
Gets the datestamp when the revision was committed.java.lang.String
getMessage()
Gets the log message attached to the revision.long
getRevision()
Gets the number of the revision that this object represents.SVNProperties
getRevisionProperties()
Returns the requested revision properties, which may be null if it would contain no revision properties.boolean
hasChildren()
Tells whether or not this log entry has children.int
hashCode()
Calculates and returns a hash code for this object.boolean
isNonInheritable()
boolean
isSubtractiveMerge()
void
setHasChildren(boolean hasChildren)
Sets wheteher this log entry has children entries or not.void
setNonInheriable(boolean nonInheritable)
void
setSubtractiveMerge(boolean substractiveMerge)
java.lang.String
toString()
Gives a string representation of this oobject.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
EMPTY_ENTRY
public static SVNLogEntry EMPTY_ENTRY
This is a log entry children stop marker use by theSVNKit
internals. Users should not compare the log entry received in theirISVNLogEntryHandler
implementations with this one. Instead, to find the end of the log entry children sequence they should check the log entry's revision for validity (i.e. that it is not less than0
).- Since:
- 1.2.0
-
myRevision
private long myRevision
-
myChangedPaths
private java.util.Map myChangedPaths
-
myRevisionProperties
private SVNProperties myRevisionProperties
-
myHasChildren
private boolean myHasChildren
-
myIsSubtractiveMerge
private boolean myIsSubtractiveMerge
-
myIsNonInheritable
private boolean myIsNonInheritable
-
-
Constructor Detail
-
SVNLogEntry
public SVNLogEntry(java.util.Map changedPaths, long revision, java.lang.String author, java.util.Date date, java.lang.String message)
Constructs an SVNLogEntry object.- Parameters:
changedPaths
- a map collection which keys are all the paths that were changed inrevision
, and values are SVNLogEntryPath representation objectsrevision
- a revision numberauthor
- the author ofrevision
date
- the datestamp when the revision was committedmessage
- an commit log message forrevision
- See Also:
SVNLogEntryPath
-
SVNLogEntry
public SVNLogEntry(java.util.Map changedPaths, long revision, SVNProperties revisionProperties, boolean hasChildren)
Constructs an SVNLogEntry object.- Parameters:
changedPaths
- a map collection which keys are all the paths that were changed inrevision
, and values are SVNLogEntryPath representation objectsrevision
- a revision numberrevisionProperties
- revision propertieshasChildren
- whether this entry has children or not- Since:
- 1.2.0
-
-
Method Detail
-
setHasChildren
public void setHasChildren(boolean hasChildren)
Sets wheteher this log entry has children entries or not. Note: this method is not intended for API users.- Parameters:
hasChildren
- whether this entry has has children or not- Since:
- 1.2.0
- See Also:
hasChildren()
-
getChangedPaths
public java.util.Map<java.lang.String,SVNLogEntryPath> getChangedPaths()
Gets a map containing all the paths that were changed in the revision that this object represents.- Returns:
- a
String
toSVNLogEntryPath
map which keys are all the paths that were changed in the revision and values represent information about each changed path
-
getAuthor
public java.lang.String getAuthor()
Returns the author of the revision that this object represents.- Returns:
- the author of the revision
-
getDate
public java.util.Date getDate()
Gets the datestamp when the revision was committed.- Returns:
- the moment in time when the revision was committed
-
getMessage
public java.lang.String getMessage()
Gets the log message attached to the revision.- Returns:
- the commit log message
-
getRevisionProperties
public SVNProperties getRevisionProperties()
Returns the requested revision properties, which may be null if it would contain no revision properties.- Returns:
- revision properties
- Since:
- 1.2.0
-
getRevision
public long getRevision()
Gets the number of the revision that this object represents.- Returns:
- a revision number
-
hashCode
public int hashCode()
Calculates and returns a hash code for this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code
-
equals
public boolean equals(java.lang.Object obj)
Compares this object with another one.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- an object to compare with- Returns:
- true
if this object is the same as the
obj
argument
-
toString
public java.lang.String toString()
Gives a string representation of this oobject.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representing this object
-
hasChildren
public boolean hasChildren()
Tells whether or not this log entry has children. When a log operation requests additional merge information, extra log entries may be returned as a result of this entry. The new entries, are considered children of the original entry, and will follow it. When the HAS_CHILDREN flag is set, the receiver should increment its stack depth, and wait until an entry is provided withSVNRepository.INVALID_REVISION
which indicates the end of the children. For log operations which do not request additional merge information, the HAS_CHILDREN flag is always false. Also for more information see: Subversion documentation- Returns:
- true if this log entry has children entries due to merge-tracking information
- Since:
- 1.2.0, new in Subversion 1.5.0
-
compare
static boolean compare(java.lang.Object o1, java.lang.Object o2)
Compares two objects.- Parameters:
o1
- the first object to compareo2
- the second object to compare- Returns:
- true if either both
o1
ando2
are null oro1.equals(o2)
returns true
-
setSubtractiveMerge
public void setSubtractiveMerge(boolean substractiveMerge)
-
isSubtractiveMerge
public boolean isSubtractiveMerge()
-
setNonInheriable
public void setNonInheriable(boolean nonInheritable)
-
isNonInheritable
public boolean isNonInheritable()
-
-