private static bool FilterSyncOutput(PerforceOutputLine Line, PerforceTagRecordParser Parser, List <string> TamperedFiles, TextWriter Log) { if (Line.Channel == PerforceOutputChannel.TaggedInfo) { Parser.OutputLine(Line.Text); return(true); } Log.WriteLine(Line.Text); const string Prefix = "Can't clobber writable file "; if (Line.Channel == PerforceOutputChannel.Error && Line.Text.StartsWith(Prefix)) { TamperedFiles.Add(Line.Text.Substring(Prefix.Length).Trim()); return(true); } return(Line.Channel != PerforceOutputChannel.Error); }
private bool RunCommand(string CommandLine, out List <Dictionary <string, string> > TagRecords, CommandOptions Options, TextWriter Log) { List <string> Lines; if (!RunCommand("-ztag " + CommandLine, PerforceOutputChannel.TaggedInfo, out Lines, Options, Log)) { TagRecords = null; return(false); } List <Dictionary <string, string> > LocalOutput = new List <Dictionary <string, string> >(); using (PerforceTagRecordParser Parser = new PerforceTagRecordParser(Record => LocalOutput.Add(Record))) { foreach (string Line in Lines) { Parser.OutputLine(Line); } } TagRecords = LocalOutput; return(true); }
private bool RunCommand(string CommandLine, out List<Dictionary<string, string>> TagRecords, CommandOptions Options, TextWriter Log) { List<string> Lines; if(!RunCommand("-ztag " + CommandLine, PerforceOutputChannel.TaggedInfo, out Lines, Options, Log)) { TagRecords = null; return false; } List<Dictionary<string, string>> LocalOutput = new List<Dictionary<string, string>>(); using(PerforceTagRecordParser Parser = new PerforceTagRecordParser(Record => LocalOutput.Add(Record))) { foreach(string Line in Lines) { Parser.OutputLine(Line); } } TagRecords = LocalOutput; return true; }
private static bool FilterSyncOutput(PerforceOutputLine Line, PerforceTagRecordParser Parser, List<string> TamperedFiles, TextWriter Log) { if(Line.Channel == PerforceOutputChannel.TaggedInfo) { Parser.OutputLine(Line.Text); return true; } Log.WriteLine(Line.Text); const string Prefix = "Can't clobber writable file "; if(Line.Channel == PerforceOutputChannel.Error && Line.Text.StartsWith(Prefix)) { TamperedFiles.Add(Line.Text.Substring(Prefix.Length).Trim()); return true; } return Line.Channel != PerforceOutputChannel.Error; }