private void DetermineMaxRevisions(string oldLabel) { // Only Execute this one-time during this process // until the GetModifications is run again. if (baseModifications == null) { Log.Info("Determine Revisions based on Promotion Group/Label : " + oldLabel); // Execute new VLog Session to get revision for old Label Execute(CreatePcliContentsForCreatingVlogByLabel(oldLabel)); using (TextReader reader = GetTextReader(LogFile)) { baseModifications = historyParser.Parse(reader, DateTime.Now, DateTime.Now); } } ArrayList allMods = new ArrayList(); foreach (Modification mod in baseModifications) { allMods.Add(mod); } foreach (Modification mod in modifications) { allMods.Add(mod); } // Only Modifications that need stamp should be generated modifications = PvcsHistoryParser.AnalyzeModifications(allMods); // Cleanup allMods.Clear(); allMods = null; }
public void SetUp() { parser = new PvcsHistoryParser(); dfi = new DateTimeFormatInfo(); dfi.AMDesignator = "AM"; dfi.PMDesignator = "PM"; dfi.MonthDayPattern = @"M/d/yy h:mm:ss tt"; }
public Modification[] Parse(TextReader reader, DateTime from, DateTime to) { string modificationFile = reader.ReadToEnd(); ArrayList mods = new ArrayList(); MatchCollection matches = _searchRegEx.Matches(modificationFile); foreach (Match archive in matches) { // We have an archive, now find modifications MatchCollection archives = _archiveRegEx.Matches(archive.Value); foreach (Match archiveDetails in archives) { ParseArchive(archiveDetails, mods); } } // Ensure that duplicates were not pulled back in the Vlog (this can be caused by doing a get using Labels) return(PvcsHistoryParser.AnalyzeModifications(mods)); }