Lines Matching +full:9 +full:- +full:series

1 # SPDX-License-Identifier: GPL-2.0+
14 from series import Series
17 re_remove = re.compile('^BUG=|^TEST=|^BRANCH=|^Change-Id:|^Review URL:'
18 '|Reviewed-on:|Commit-\w*:')
21 re_allowed_after_test = re.compile('^Signed-off-by:')
24 re_signoff = re.compile('^Signed-off-by: *(.*)')
27 re_cover = re.compile('^Cover-letter:')
30 re_cover_cc = re.compile('^Cover-letter-cc: *(.*)')
32 # Patch series tag
33 re_series_tag = re.compile('^Series-([a-z-]*): *(.*)')
35 # Commit series tag
36 re_commit_tag = re.compile('^Commit-([a-z-]*): *(.*)')
39 re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Patch-cc): (.*)')
42 re_commit = re.compile('^commit ([0-9a-f]*)$')
47 # States we can be in - can we use range() and still have comments?
51 STATE_DIFFS = 3 # In the diff part (past --- line)
54 """Class for detecting/injecting tags in a patch or series of patches
61 def __init__(self, series, name=None, is_log=False): argument
68 self.notes = [] # Series notes
70 self.series = series # Info about the patch series
72 self.in_change = 0 # Non-zero if we are in a change list
79 """Add a new Series-xxx tag.
81 When a Series-xxx tag is detected, we come here to record it, if we
86 name: Tag name (part after 'Series-')
87 value: Tag value (part after 'Series-xxx: ')
93 self.series.AddTag(self.commit, line, name, value)
96 """Add a new Commit-xxx tag.
98 When a Commit-xxx tag is detected, we come here to record it.
102 name: Tag name (part after 'Commit-')
103 value: Tag value (part after 'Commit-xxx: ')
106 self.in_section = 'commit-' + name
112 self.series.AddCommit(self.commit)
114 # If 'END' is missing in a 'Cover-letter' section, and that section
118 self.series.cover = self.section
188 self.series.cover = self.section
191 self.series.notes += self.section
192 elif self.in_section == 'commit-notes':
203 self.warn.append("Missing 'blank line' in section 'Series-changes'")
210 self.series.cover = self.section
213 self.series.notes += self.section
214 elif self.in_section == 'commit-notes':
247 self.AddToSeries(line, 'cover-cc', value)
254 elif line == '---':
259 self.series.AddChange(self.in_change, self.commit, line)
262 # Detect Series-xxx tags
278 # Detect Commit-xxx tags
293 # Remove Tested-by self, since few will take much notice
294 if (tag_match.group(1) == 'Tested-by' and
295 tag_match.group(2).find(os.getenv('USER') + '@') != -1):
297 elif tag_match.group(1) == 'Patch-cc':
316 # OK, we have a valid non-blank line
325 elif line == '---':
330 log = self.series.MakeChangeLog(self.commit)
360 re_fname = re.compile('diff --git a/(.*) b/.*')
376 if self.blank_count and (line == '-- ' or match):
386 series = None, allow_overwrite=False): argument
387 """Reads out patch series metadata from the commits
396 series: Series object to add information into. By default a new series
400 A Series object containing information about the commits.
402 if not series:
403 series = Series()
404 series.allow_overwrite = allow_overwrite
408 ps = PatchStream(series, is_log=True)
412 return series
415 """Reads out patch series metadata from the commits
432 series = Series()
433 ps = PatchStream(series, is_log=True)
437 return series
439 def FixPatch(backup_dir, fname, series, commit): argument
449 series: Series information about this patch set
457 ps = PatchStream(series)
469 def FixPatches(series, fnames): argument
475 series: The series object
479 backup_dir = None #tempfile.mkdtemp('clean-patch')
482 commit = series.commits[count]
484 result = FixPatch(backup_dir, fname, series, commit)
493 def InsertCoverLetter(fname, series, count): argument
498 series: Series object
499 count: Number of patches in the series
506 text = series.cover
507 prefix = series.GetPatchPrefix()
519 if series.get('notes'):
520 line += '\n'.join(series.notes) + '\n'
523 out = series.MakeChangeLog(None)