Lines Matching full:line
21 # Lines which are allowed after a TEST= line
50 STATE_PATCH_SUBJECT = 1 # In patch subject (first line of log for a commit)
52 STATE_DIFFS = 3 # In the diff part (past --- line)
63 self.skip_blank = False # True to skip a single blank line
64 self.found_test = False # Found a TEST= line
67 self.linenum = 1 # Output line number we are up to
76 self.signoff = [] # Contents of signoff line
79 def AddToSeries(self, line, name, value): argument
86 line: Source line containing tag (useful for debug/error messages)
94 self.series.AddTag(self.commit, line, name, value)
96 def AddToCommit(self, line, name, value): argument
102 line: Source line containing tag (useful for debug/error messages)
124 def ProcessLine(self, line): argument
125 """Process a single line of a patch file or commit log
127 This process a line and returns a list of lines to output. The list
143 line: text line to process
148 # Initially we have no output. Prepare the input line string
150 line = line.rstrip('\n')
152 commit_match = re_commit.match(line) if self.is_log else None
155 if line[:4] == ' ':
156 line = line[4:]
159 series_tag_match = re_series_tag.match(line)
160 commit_tag_match = re_commit_tag.match(line)
161 cover_match = re_cover.match(line)
162 cover_cc_match = re_cover_cc.match(line)
163 signoff_match = re_signoff.match(line)
166 tag_match = re_tag.match(line)
167 is_blank = not line.strip()
174 # It has its own line with a Subject: tag
201 # but we are already in a change list, that means a blank line
204 self.warn.append("Missing 'blank line' in section 'Series-changes'")
209 if line == 'END':
224 self.section.append(line)
228 self.commit.subject = line
231 elif re_remove.match(line) and not commit_tag_match:
236 if line.startswith('TEST='):
248 self.AddToSeries(line, 'cover-cc', value)
253 # Blank line ends this change list
255 elif line == '---':
257 out = self.ProcessLine(line)
260 self.series.AddChange(self.in_change, self.commit, line)
273 (self.commit.hash, line))
276 self.AddToSeries(line, name, value)
284 self.AddToCommit(line, name, value)
297 self.warn.append("Ignoring %s" % line)
301 out = [line]
307 out = [line]
309 # Well that means this is an ordinary line
312 m = re_space_before_tab.match(line)
314 self.warn.append('Line %d/%d has space before tab' %
317 # OK, we have a valid non-blank line
318 out = [line]
326 elif line == '---':
332 out += [line]
337 if not re_allowed_after_test.match(line):
363 line = infd.readline()
364 if not line:
366 out = self.ProcessLine(line)
369 for line in out:
370 match = re_fname.match(line)
374 if line == '+':
377 if self.blank_count and (line == '-- ' or match):
378 self.warn.append("Found possible blank line(s) at "
381 outfd.write(line + '\n')
410 for line in stdout.splitlines():
411 ps.ProcessLine(line)
435 for line in text.splitlines():
436 ps.ProcessLine(line)
509 for line in lines:
510 if line.startswith('Subject:'):
514 line = 'Subject: [%s %s/%d] %s\n' % (prefix, zero, count, text[0])
517 elif line.startswith('*** BLURB HERE ***'):
519 line = '\n'.join(text[1:]) + '\n'
521 line += '\n'.join(series.notes) + '\n'
525 line += '\n' + '\n'.join(out)
526 fd.write(line)