|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.tmatesoft.svn.core.wc2.SvnOperation<T>
org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SVNLogEntry>
org.tmatesoft.svn.core.wc2.SvnLog
public class SvnLog
Represents log operation.
Gets commit log messages with other revision specific information for target' paths(targetPaths)
from a repository and returns them as list of SVNLogEntry items.
Useful for observing the history of affected paths, author, date and log comments information
per revision.
Target can represent one repository URL with list of relative paths - targetPaths
or many targets representing working copy paths can be provided, and targetPaths should not be set.
Operation finds root URL of the working copy paths, and calculates relativetargetPaths for them.
Operation creates SVNLogEntry item on each log message from
startRevision to endRevision in turn, inclusive
(but never creates item on a given log message more than once).
targetPaths. Targets' pegRevisions
indicates in which revision targetPaths' paths are valid. If target's
pegRevision is invalid, it
defaults to SVNRevision.WORKING if target is working copy path, or
SVNRevision.HEAD if target is URL.
If limit is non-zero, only creates first limit log entries.
If discoverChangedPaths is set, then the changed paths
Map argument will be passed to a constructor of
SVNLogEntry on each invocation of handler.
If stopOnCopy is set, copy history (if any exists) will not
be traversed while harvesting revision logs for each targetPath.
If useMergedHistory is set, log information for
revisions which have been merged to targetPaths will also be
returned.
Refer to SVNLogEntry.hasChildren() for
additional information on how to handle mergeinfo information during a
log operation.
If
revisionProperties is null, retrieves all revision properties;
else, retrieves only the revision properties named in the array (i.e. retrieves none if the array is empty).
For every SvnRevisionRange in revisionRanges:
If startRevision is valid but
endRevision is not, then endRevision defaults
to startRevision. If both startRevision and
endRevision are invalid, then endRevision
defaults to revision 0, and startRevision
defaults either to target's pegRevision in case the latter one is
valid, or to SVNRevision.BASE, if it is not.
Important: to avoid an exception with the
SVNErrorCode.FS_NO_SUCH_REVISION error code when invoked against
an empty repository (i.e. one not containing a revision 1), callers
should specify the range SVNRevision.HEAD:0.
If the caller has provided a non-null
ISVNEventHandler, it will be called with the
SVNEventAction.SKIP event action on any unversioned paths.
Note: this routine requires repository access.
SvnOperation.run() method throws SVNException in if one of the following is true:
paths contain entries that belong to different repositories
SVNLogEntry| Constructor Summary | |
|---|---|
protected |
SvnLog(SvnOperationFactory factory)
|
| Method Summary | |
|---|---|
void |
addRange(SvnRevisionRange range)
Adds the revision range to the operation's revision ranges. |
protected void |
ensureArgumentsAreValid()
|
long |
getLimit()
Returns a maximum number of log entries to be processed |
protected int |
getMaximumTargetsCount()
|
java.lang.String[] |
getRevisionProperties()
Returns what properties should be retrieved. |
java.util.Collection<SvnRevisionRange> |
getRevisionRanges()
Returns all revision ranges for those log should be reported. |
java.lang.String[] |
getTargetPaths()
Returns all relative paths what should be reported for each target. |
boolean |
isChangesWorkingCopy()
Gets whether the operation changes working copy |
boolean |
isDiscoverChangedPaths()
Returns whether to report of all changed paths for every revision being processed If true then the changed paths Map argument will be passed to a constructor of
SVNLogEntry. |
boolean |
isStopOnCopy()
Returns whether to copy history (if any exists) should be traversed while harvesting revision logs for each targetPath. |
boolean |
isUseMergeHistory()
Returns whether the log information for revisions which have been merged to targetPaths will also be returned. |
void |
setDiscoverChangedPaths(boolean discoverChangedPaths)
Sets whether to report of all changed paths for every revision being processed If true then the changed paths Map argument will be passed to a constructor of
SVNLogEntry. |
void |
setLimit(long limit)
Sets a maximum number of log entries to be processed |
void |
setRevisionProperties(java.lang.String[] revisionProperties)
Sets what properties should be retrieved. |
void |
setRevisionRanges(java.util.Collection<SvnRevisionRange> revisionRanges)
Sets all revision ranges for those log should be reported. |
void |
setStopOnCopy(boolean stopOnCopy)
Sets whether to copy history (if any exists) should be traversed while harvesting revision logs for each targetPath. |
void |
setTargetPaths(java.lang.String[] targetPaths)
Sets all relative paths what should be reported for each target. |
void |
setUseMergeHistory(boolean useMergeHistory)
Sets whether the log information for revisions which have been merged to targetPaths will also be returned. |
| Methods inherited from class org.tmatesoft.svn.core.wc2.SvnReceivingOperation |
|---|
first, getReceiver, initDefaults, last, receive, run, setReceiver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SvnLog(SvnOperationFactory factory)
| Method Detail |
|---|
public long getLimit()
public void setLimit(long limit)
limit - maximum number of entriespublic boolean isUseMergeHistory()
targetPaths will also be returned.
true if merged revisions should be also reported, otherwise falsepublic void setUseMergeHistory(boolean useMergeHistory)
targetPaths will also be returned.
useMergeHistory - true if merged revisions should be also reported, otherwise falsepublic boolean isDiscoverChangedPaths()
true then the changed paths Map argument will be passed to a constructor of
SVNLogEntry.
true if all changed paths for every revision being processed should be reported, otherwise falsepublic void setDiscoverChangedPaths(boolean discoverChangedPaths)
true then the changed paths Map argument will be passed to a constructor of
SVNLogEntry.
discoverChangedPaths - true if all changed paths for every revision being processed should be reported, otherwise falsepublic boolean isStopOnCopy()
targetPath.
true if not to cross copies while traversing history, otherwise copies history will be also included into processingpublic void setStopOnCopy(boolean stopOnCopy)
targetPath.
stopOnCopy - true if not to cross copies while traversing history, otherwise copies history will be also included into processingpublic java.util.Collection<SvnRevisionRange> getRevisionRanges()
SVNRevisionRange objectspublic void setRevisionRanges(java.util.Collection<SvnRevisionRange> revisionRanges)
revisionRanges - collection of SVNRevisionRange objectspublic java.lang.String[] getTargetPaths()
target.
targetpublic void setTargetPaths(java.lang.String[] targetPaths)
target.
targetPaths - relative paths of the targetpublic java.lang.String[] getRevisionProperties()
revisionProperties is null, retrieves all revision properties;
else retrieves only the revision properties named in the array (i.e. retrieves none if the array is empty).
public void setRevisionProperties(java.lang.String[] revisionProperties)
revisionProperties is null, retrieves all revision properties;
else retrieves only the revision properties named in the array (i.e. retrieves none if the array is empty).
revisionProperties - array of names of the properties
protected void ensureArgumentsAreValid()
throws SVNException
ensureArgumentsAreValid in class SvnOperation<SVNLogEntry>SVNExceptionpublic void addRange(SvnRevisionRange range)
range - revision rangeprotected int getMaximumTargetsCount()
getMaximumTargetsCount in class SvnOperation<SVNLogEntry>public boolean isChangesWorkingCopy()
isChangesWorkingCopy in class SvnOperation<SVNLogEntry>true if the operation changes the working copy, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||