Class RevisionData
java.lang.Object
net.sf.statsvn.input.RevisionData
Container for all information contained in one SVN revision.
- Version:
- $Id: RevisionData.java 351 2008-03-28 18:46:26Z benoitx $
- Author:
- Richard Cyganiak invalid input: '<'richard@cyganiak.de> *, Gunter Mussbacher invalid input: '<'gunterm@site.uottawa.ca>, Jason Kealey invalid input: '<'jkealey@shade.ca>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a new instance of the RevisionData, with the same fields as the current one.getDate()intintbooleanChecks if the revision contains numbers for the added and removed lines.booleanisChange()Returns true if this revisionNumber is a normal change.booleanReturns true if this revisionNumber is the creation of a new file or a restore..booleanReturns true if this revisionNumber is the removal of a file.booleanReturns true if this is a dead revisionNumber.booleanReturns true if this is an Exp ("exposed"?) revisionNumber.voidsetComment(String comment) voidsetCopyfromPath(String copyfromPath) voidsetCopyfromRevision(String copyfromRevision) voidvoidsetLines(int added, int removed) Sets the number of added and removed lines.voidsetLoginName(String authorName) voidsetRevisionNumber(String revision) Sets the revision number.voidsetStateAdded(boolean isAdded) Is this revision an addition? New in StatSVN: This is no longer a still exists in working copy.voidsetStateDead(boolean isDead) Is this revision a deletion?voidsetStateExp(boolean isExposed) Is the revision exposed.toString()Returns the current revision data in string format.
-
Constructor Details
-
RevisionData
public RevisionData()
-
-
Method Details
-
getLoginName
- Returns:
- Returns the loginName.
-
setLoginName
- Parameters:
authorName- The loginName to set.
-
getDate
- Returns:
- Returns the date.
-
setDate
- Parameters:
date- The date to set.
-
getLinesAdded
public int getLinesAdded()- Returns:
- Returns the linesAdded.
-
getLinesRemoved
public int getLinesRemoved()- Returns:
- Returns the linesRemoved.
-
hasNoLines
public boolean hasNoLines()Checks if the revision contains numbers for the added and removed lines.- Returns:
- true if the revision contains numbers for the added and removed lines
-
setLines
public void setLines(int added, int removed) Sets the number of added and removed lines.- Parameters:
added- The number of added linesremoved- The number of removed lines
-
getRevisionNumber
- Returns:
- Returns the revisionNumber.
-
setRevisionNumber
Sets the revision number.- Parameters:
revision- The revision number
-
setStateDead
public void setStateDead(boolean isDead) Is this revision a deletion?- Parameters:
isDead- true if revision is a deletion.
-
setStateExp
public void setStateExp(boolean isExposed) Is the revision exposed. This is CVS speak for any "live" revisionNumber, that is, if this is the current revisionNumber, then a file exists in the working copy. New in StatSVN: We use it to mean this revision is not a deletion revision. (modify, add or replace)- Parameters:
isExposed- true true if the revision is not a deletion.
-
setStateAdded
public void setStateAdded(boolean isAdded) Is this revision an addition? New in StatSVN: This is no longer a still exists in working copy. We use it to mean this revision is not a deletion revision.- Parameters:
isAdded-
-
getComment
- Returns:
- Returns the comment.
-
setComment
- Parameters:
comment- The comment to set.
-
isDeletion
public boolean isDeletion()Returns true if this revisionNumber is the removal of a file.- Returns:
- true if this revisionNumber deletes the file.
-
isChange
public boolean isChange()Returns true if this revisionNumber is a normal change. New in StatSVN: This was isChangeOrRestore before.- Returns:
- true if this is a normal change or a restore.
-
isCreationOrRestore
public boolean isCreationOrRestore()Returns true if this revisionNumber is the creation of a new file or a restore.. The distinction between these two cases can be made by looking at the previous (in time, not log order) revisionNumber. If it was a deletion, then this revisionNumber is a restore. New in StatSVN: This was isCreation before.- Returns:
- true if this is the creation of a new file.
-
isStateExp
public boolean isStateExp()Returns true if this is an Exp ("exposed"?) revisionNumber. This is CVS speak for any "live" revisionNumber, that is, if this is the current revisionNumber, then a file exists in the working copy. New in StatSVN: We use it to mean this revision is not a deletion revision. (modify, add or replace)- Returns:
- true if this is an Exp revisionNumber
-
isStateDead
public boolean isStateDead()Returns true if this is a dead revisionNumber. If this is the current revisionNumber, then the file does not exist in the working copy.- Returns:
- true if this is a dead revisionNumber
-
toString
-
createCopy
Returns a new instance of the RevisionData, with the same fields as the current one.- Returns:
- the clone
-
getCopyfromPath
-
setCopyfromPath
-
getCopyfromRevision
-
setCopyfromRevision
-