]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/patman/patchstream.py
patman: Add Series-process-log tag to sort/uniq change logs
[karo-tx-uboot.git] / tools / patman / patchstream.py
index 91542adb9b0c6f0afdc4c22308c486790847ac60..7334ed30e36da32490f2fae2fe943b8f16238081 100644 (file)
@@ -31,7 +31,7 @@ from series import Series
 
 # Tags that we detect and remove
 re_remove = re.compile('^BUG=|^TEST=|^BRANCH=|^Change-Id:|^Review URL:'
-    '|Reviewed-on:|Commit-Ready:')
+    '|Reviewed-on:|Commit-\w*:')
 
 # Lines which are allowed after a TEST= line
 re_allowed_after_test = re.compile('^Signed-off-by:')
@@ -42,14 +42,17 @@ re_signoff = re.compile('^Signed-off-by:')
 # The start of the cover letter
 re_cover = re.compile('^Cover-letter:')
 
+# A cover letter Cc
+re_cover_cc = re.compile('^Cover-letter-cc: *(.*)')
+
 # Patch series tag
-re_series = re.compile('^Series-(\w*): *(.*)')
+re_series = re.compile('^Series-([a-z-]*): *(.*)')
 
 # Commit tags that we want to collect and keep
 re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Cc): (.*)')
 
 # The start of a new commit in the git log
-re_commit = re.compile('^commit (.*)')
+re_commit = re.compile('^commit ([0-9a-f]*)$')
 
 # We detect these since checkpatch doesn't always do it
 re_space_before_tab = re.compile('^[+].* \t')
@@ -153,6 +156,7 @@ class PatchStream:
         # Handle state transition and skipping blank lines
         series_match = re_series.match(line)
         commit_match = re_commit.match(line) if self.is_log else None
+        cover_cc_match = re_cover_cc.match(line)
         tag_match = None
         if self.state == STATE_PATCH_HEADER:
             tag_match = re_tag.match(line)
@@ -205,6 +209,10 @@ class PatchStream:
             self.in_section = 'cover'
             self.skip_blank = False
 
+        elif cover_cc_match:
+            value = cover_cc_match.group(1)
+            self.AddToSeries(line, 'cover-cc', value)
+
         # If we are in a change list, key collected lines until a blank one
         elif self.in_change:
             if is_blank: