nameAndDateIndex++;
nameAndDateLine = (String) entry.get(nameAndDateIndex);
LOG.debug("adjusting for the line that starts with Label");
}
Modification modification = new Modification("vss");
modification.userName = parseUser(nameAndDateLine);
modification.modifiedTime = parseDate(nameAndDateLine);
String folderLine = (String) entry.get(0);
int fileIndex = nameAndDateIndex + 1;
String fileLine = (String) entry.get(fileIndex);
if (fileLine.startsWith("Checked in")) {
LOG.debug("this is a checkin");
int commentIndex = fileIndex + 1;
modification.comment = parseComment(entry, commentIndex);
String fileName = folderLine.substring(7, folderLine.indexOf(" *"));
String folderName = fileLine.substring(12);
Modification.ModifiedFile modfile = modification.createModifiedFile(fileName, folderName);
modfile.action = "checkin";
} else if (fileLine.endsWith("Created")) {
modification.type = "create";
LOG.debug("this folder was created");
} else {
String fileName;
String folderName;
if (nameAndDateIndex == 1) {
folderName = vssPath;
} else {
folderName = vssPath + "\\" + folderLine.substring(7, folderLine.indexOf(" *"));
}
int lastSpace = fileLine.lastIndexOf(" ");
if (lastSpace != -1) {
fileName = fileLine.substring(0, lastSpace);
} else {
fileName = fileLine;
if (fileName.equals("Branched")) {
LOG.debug("Branched file, ignoring as branch directory is handled separately");
return null;
}
}
Modification.ModifiedFile modfile = modification.createModifiedFile(fileName, folderName);
if (fileLine.endsWith("added")) {
modfile.action = "add";
LOG.debug("this file was added");
} else if (fileLine.endsWith("deleted")) {