Package net.sf.statcvs.util
Class CvsLogUtils
java.lang.Object
net.sf.statcvs.util.CvsLogUtils
Utility class containing various methods related to CVS logfile parsing
- Version:
- $Id: CvsLogUtils.java,v 1.5 2008/04/02 11:22:15 benoitx Exp $
- Author:
- Richard Cyganiak <rcyg@gmx.de>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getModuleName
(String rcsFilename, String workingFilename) Determines the module name by comparing the RCS filename and the working filename.static boolean
Returns true if files with a given keyword substitution should be treated as binary files.static boolean
Determines if a file is in the attic by comparing the location of the RCS file and the working file.static boolean
isOnMainBranch
(String revisionNumber) Returnstrue
if this revision is part of the main branch, andfalse
if it is part of a side branch.
-
Constructor Details
-
CvsLogUtils
public CvsLogUtils()
-
-
Method Details
-
isInAttic
Determines if a file is in the attic by comparing the location of the RCS file and the working file.
The RCS file is the file containing the version history. It is located in the CVSROOT directory of the repository. It's name ends in ",v". The filename is absoulte.
The working filename is the actual filename relative to the root of the checked-out module.
A file is said to be in the attic if and only if it is dead on the main branch. If a file is in the attic, it's RCS file is moved to a subdirectory called "Attic". This method checks if the RCS file is in the "Attic" subdirectory.
- Parameters:
rcsFilename
- a version-controlled file's RCS filenameworkingFilename
- a version-controlled file's working filename- Returns:
- true if the file is in the attic
-
isOnMainBranch
Returnstrue
if this revision is part of the main branch, andfalse
if it is part of a side branch. Revisions like 1.1 and 5.212 are on the main branch, 1.1.1.1 and 1.4.2.13 and 1.4.2.13.4.1 are on side branches.- Parameters:
revisionNumber
- the revision's number, for example "1.1"- Returns:
true
if this revision is part of the main branch.
-
getModuleName
Determines the module name by comparing the RCS filename and the working filename.- Parameters:
rcsFilename
- a version-controlled file's RCS filenameworkingFilename
- a version-controlled file's working filename- Returns:
- the module name
-
isBinaryKeywordSubst
Returns true if files with a given keyword substitution should be treated as binary files. That is, they should be assumed to be 0 lines of code. Possible values are the same as for the -kXXX option of CVS (for example, kv, kvl, b).- Parameters:
kws
- the keyword substitution, as of CVS option -kXXX- Returns:
- true if this is a binary keyword substitution
- Throws:
IllegalArgumentException
- if kws is not a known keyword substitution
-