net.sf.statcvs.util
Class CvsLogUtils
Utility class containing various methods related to CVS logfile parsing
$Id: CvsLogUtils.java,v 1.5 2008/04/02 11:22:15 benoitx Exp $static String | getModuleName(String rcsFilename, String workingFilename) - Determines the module name by comparing the RCS filename and
the working filename.
|
static boolean | isBinaryKeywordSubst(String kws) - Returns true if files with a given keyword substitution
should be treated as binary files.
|
static boolean | isInAttic(String rcsFilename, String workingFilename) - 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) - Returns
true if this revision is part of the main branch,
and false if it is part of a side branch.
|
getModuleName
public static String getModuleName(String rcsFilename,
String workingFilename)
Determines the module name by comparing the RCS filename and
the working filename.
rcsFilename
- a version-controlled file's RCS filenameworkingFilename
- a version-controlled file's working filename
isBinaryKeywordSubst
public static boolean isBinaryKeywordSubst(String kws)
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).
kws
- the keyword substitution, as of CVS option -kXXX
- true if this is a binary keyword substitution
isInAttic
public static boolean isInAttic(String rcsFilename,
String workingFilename)
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.
rcsFilename
- a version-controlled file's RCS filenameworkingFilename
- a version-controlled file's working filename
- true if the file is in the attic
isOnMainBranch
public static boolean isOnMainBranch(String revisionNumber)
Returns true
if this revision is part of the main branch,
and false
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.
revisionNumber
- the revision's number, for example "1.1"
true
if this revision is part of the main branch.