Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
		protected void CreatePvcs()
		{
			mockParser = new DynamicMock(typeof (IHistoryParser));
			mockExecutor = new DynamicMock(typeof (ProcessExecutor));
			pvcs = new Pvcs((IHistoryParser) mockParser.MockInstance, (ProcessExecutor) mockExecutor.MockInstance);
		}