]> git.sur5r.net Git - u-boot/blobdiff - tools/patman/patchstream.py
SPDX: Correct SPDX tags from recent xilinx merge
[u-boot] / tools / patman / patchstream.py
index 6098728aa118db0e20d59a590072263faf37aefc..b6455b0fa3839e3c26ea633d9f268aeeaf78f201 100644 (file)
@@ -1,7 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
 # Copyright (c) 2011 The Chromium OS Authors.
 #
-# SPDX-License-Identifier:     GPL-2.0+
-#
 
 import math
 import os
@@ -424,6 +423,19 @@ def GetMetaData(start, count):
     """
     return GetMetaDataForList('HEAD~%d' % start, None, count)
 
+def GetMetaDataForTest(text):
+    """Process metadata from a file containing a git log. Used for tests
+
+    Args:
+        text:
+    """
+    series = Series()
+    ps = PatchStream(series, is_log=True)
+    for line in text.splitlines():
+        ps.ProcessLine(line)
+    ps.Finalize()
+    return series
+
 def FixPatch(backup_dir, fname, series, commit):
     """Fix up a patch file, by adding/removing as required.