private static void ParseArchive(Match archive, IList modifications) { string archivePath = archive.Groups["ArchiveName"].Value.Trim(); DateTime createdDate = Pvcs.GetDate(archive.Groups["CreatedDate"].Value.Trim()); MatchCollection revisions = _revisionRegEx.Matches(archive.Value); foreach (Match revision in revisions) { modifications.Add(ParseModification(revision, archivePath, createdDate)); } }
private static Modification ParseModification(Match revision, string path, DateTime createdDate) { Modification mod = new Modification(); mod.Comment = revision.Groups["Comment"].Value.Trim(); mod.FileName = Path.GetFileName(path); mod.FolderName = Path.GetDirectoryName(path).Trim(); mod.ModifiedTime = Pvcs.GetDate(revision.Groups["CheckIn"].Value.Trim()); mod.UserName = revision.Groups["Author"].Value.Trim(); mod.Version = revision.Groups["Version"].Value.Trim(); mod.Type = (mod.ModifiedTime == createdDate) ? "New" : "Checked in"; return(mod); }