org.tmatesoft.svn.core.wc
public class SVNStatus extends Object
Within the status handler implementation a developer decides how to interpret status information. For some purposes this way may be more flexible in comparison with calling doStatus() that returns an SVNStatus per one local item. However the latter one may be useful when needing to find out the status of the concrete item.
There are two approaches how to process SVNStatus objects:
1. Implementing an ISVNStatusHandler:
import org.tmatesoft.svn.core.wc.ISVNStatusHandler; import org.tmatesoft.svn.core.wc.SVNStatus; import org.tmatesoft.svn.core.wc.SVNStatusType; ... public class MyCustomStatusHandler implements ISVNStatusHandler { public void handleStatus(SVNStatus status) { //parse the item's contents status if(status.getContentsStatus() == SVNStatusType.STATUS_MODIFIED) { ... } else if(status.getContentsStatus() == SVNStatusType.STATUS_CONFLICTED) { ... } ... //parse properties status if(status.getPropertiesStatus() == SVNStatusType.STATUS_MODIFIED) { ... } ... } }
... import org.tmatesoft.svn.core.wc.SVNStatusClient; ... SVNStatusClient statusClient; ... statusClient.doStatus(...., new MyCustomStatusHandler()); ...
... SVNStatus status = statusClient.doStatus(new File(myPath), false); //parsing status info here ...
SVNStatus's methods which names start with getRemote
are relevant
for remote status invocations - that is when a doStatus() method of SVNStatusClient
is called with the flag remote
set to true.
Version: 1.1.1
See Also: ISVNStatusHandler SVNStatusType Examples
Constructor Summary | |
---|---|
SVNStatus(SVNURL url, File file, SVNNodeKind kind, SVNRevision revision, SVNRevision committedRevision, Date committedDate, String author, SVNStatusType contentsStatus, SVNStatusType propertiesStatus, SVNStatusType remoteContentsStatus, SVNStatusType remotePropertiesStatus, boolean isLocked, boolean isCopied, boolean isSwitched, File conflictNewFile, File conflictOldFile, File conflictWrkFile, File projRejectFile, String copyFromURL, SVNRevision copyFromRevision, SVNLock remoteLock, SVNLock localLock, Map entryProperties)
Constructs an SVNStatus object filling it with status information
details.
|
Method Summary | |
---|---|
String | getAuthor()
Gets the author who last changed the item.
|
Date | getCommittedDate()
Gets the timestamp when the item was last changed (committed).
|
SVNRevision | getCommittedRevision()
Gets the revision when the item was last changed (committed).
|
File | getConflictNewFile()
Gets the temporary file that contains all latest changes from the
repository which led to a conflict with local changes. |
File | getConflictOldFile()
Gets the temporary BASE revision file of that working file that is
currently in conflict with changes received from the repository. |
File | getConflictWrkFile()
Gets the temporary '.mine' file with all current local changes to the
original file. |
SVNStatusType | getContentsStatus()
Gets the Working Copy local item's contents status type.
|
SVNRevision | getCopyFromRevision()
Gets the revision of the item's ancestor
from which the item was copied (the item is added
with history).
|
String | getCopyFromURL()
Gets the URL (repository location) of the ancestor from which the
item was copied. |
SVNEntry | getEntry()
Returns a WC entry for which this object is generated.
|
Map | getEntryProperties()
Gets the item's SVN specific '<entry' properties.
|
File | getFile()
Gets the item's path in the filesystem.
|
SVNNodeKind | getKind()
Gets the item's node kind characterizing it as an entry.
|
SVNLock | getLocalLock()
Gets the file item's local lock.
|
SVNStatusType | getPropertiesStatus()
Gets the Working Copy local item's properties status type.
|
File | getPropRejectFile()
Gets the '.prej' file containing details on properties conflicts.
|
String | getRemoteAuthor()
Gets the item's last changed author. |
SVNStatusType | getRemoteContentsStatus()
Gets the Working Copy item's contents status type against the
repository - that is comparing the item's BASE revision and the
latest one in the repository when the item was changed.
|
Date | getRemoteDate()
Gets the item's last changed date. |
SVNNodeKind | getRemoteKind()
Returns the kind of the item got from the repository. |
SVNLock | getRemoteLock()
Gets the file item's repository lock -
applicable for a remote status invocation.
|
SVNStatusType | getRemotePropertiesStatus()
Gets the Working Copy item's properties status type against the
repository - that is comparing the item's BASE revision and the
latest one in the repository when the item was changed. |
SVNRevision | getRemoteRevision()
Gets the item's last committed repository revision. |
SVNURL | getRemoteURL()
Gets the item's latest repository location.
|
SVNRevision | getRevision()
Gets the item's current working revision.
|
SVNURL | getURL()
Gets the item's repository location. |
Date | getWorkingContentsDate()
Returns the last modified local time of the file item.
|
Date | getWorkingPropertiesDate()
Returns the last modified local time of file or directory
properties.
|
boolean | isCopied()
Finds out if the item is added with history.
|
boolean | isLocked()
Finds out if the item is locked (not a user lock but a driver's
one when during an operation a Working Copy is locked in .svn
administrative areas to prevent from other operations interrupting
until the running one finishes).
|
boolean | isSwitched()
Finds out whether the item is switched to a different
repository location.
|
void | markExternal()
Marks the item as an external. |
void | setContentsStatus(SVNStatusType statusType)
Sets the item's contents status type. |
void | setEntry(SVNEntry entry)
Sets a WC entry for which this object is generated.
|
void | setRemoteStatus(SVNStatusType contents, SVNStatusType props, SVNLock lock, SVNNodeKind kind)
Sets the item's remote status. |
void | setRemoteStatus(SVNURL url, SVNStatusType contents, SVNStatusType props, SVNLock lock, SVNNodeKind kind, SVNRevision revision, Date date, String author)
Sets the item's remote status. |
Used by SVNKit internals to construct and initialize an SVNStatus object. It's not intended for users (from an API point of view).
Parameters: url item's repository location file item's path in a File representation kind item's node kind revision item's working revision committedRevision item's last changed revision committedDate item's last changed date author item's last commit author contentsStatus local status of item's contents propertiesStatus local status of item's properties remoteContentsStatus status of item's contents against a repository remotePropertiesStatus status of item's properties against a repository isLocked if the item is locked by the driver (not a user lock) isCopied if the item is added with history isSwitched if the item is switched to a different URL conflictNewFile temp file with latest changes from the repository conflictOldFile temp file just as the conflicting one was at the BASE revision conflictWrkFile temp file with all user's current local modifications projRejectFile temp file describing properties conflicts copyFromURL url of the item's ancestor from which the item was copied copyFromRevision item's ancestor revision from which the item was copied remoteLock item's lock in the repository localLock item's local lock entryProperties item's SVN specific '<entry' properties
Returns: the item's last commit author
Returns: the last committed date
Returns: the last committed revision
Returns: an autogenerated temporary file just as it is in the latest revision in the repository
Returns: an autogenerated temporary file just as the conflicting file was before any modifications to it
Returns: an autogenerated temporary file with only the user's modifications
Returns: the local contents status type
Returns: the ancestor's revision
Returns: the item ancestor's URL
Returns: a WC entry (if set)
Returns: a Map which keys are names of SVN entry properties mapped against their values (both strings)
Returns: a File representation of the item's path
Returns: the item's node kind (whether it's a file, directory, etc.)
Returns: file item's local lock
Returns: the local properties status type
Returns: the properties conflicts file
Returns: a last commit author
If the remote contents status type != STATUS_NONE the local file may be out of date.
Returns: the remote contents status type
Returns: a repository last changed date
Returns: a remote item kind
Returns: file item's repository lock
If the remote properties status type != STATUS_NONE the local file may be out of date.
Returns: the remote properties status type
Returns: the latest repository revision when the item was changed; null or UNDEFINED if the repository revision is unavailable
getURL()
returns the item's
URL as it's defined in a URL entry property. Applicable
for a remote status invocation.
Returns: the item's URL as it's real repository location
Returns: the item's working revision
Returns: the item's URL represented as an SVNURL object
Date(0)
).
Returns: last modified time of the file
Returns: last modified time of the item properties
Returns: true if the item is added with history, otherwise false
To clean up a Working Copy use doCleanup()
.
Returns: true if locked, otherwise false
Returns: true if switched, otherwise false
Parameters: statusType status type of the item's contents
Parameters: entry a WC entry
Parameters: contents item's contents status type against the repository props item's properties status type against the repository lock item's lock in the repository kind item's node kind
Parameters: url item's repository URL contents item's contents status type against the repository props item's properties status type against the repository lock item's lock in the repository kind item's node kind revision item's latest revision when it was last committed date last item's committed date author last item's committed author