[U-Boot] [PATCH v3 14/18] patman: Start with a clean series when needed

Simon Glass sjg at chromium.org
Sat Sep 6 03:00:19 CEST 2014


For reasons that are not well-understood, GetMetaDataForList() can end up
adding to an existing series even when it appears that it should be
starting a new one.

Change from using a default constructor parameter to an explicit one, to
work around this problem.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3: None
Changes in v2: None

 tools/patman/patchstream.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index b0b8153..b3e66c3 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -355,7 +355,7 @@ class PatchStream:
 
 
 def GetMetaDataForList(commit_range, git_dir=None, count=None,
-                       series = Series()):
+                       series = None):
     """Reads out patch series metadata from the commits
 
     This does a 'git log' on the relevant commits and pulls out the tags we
@@ -370,6 +370,8 @@ def GetMetaDataForList(commit_range, git_dir=None, count=None,
     Returns:
         A Series object containing information about the commits.
     """
+    if not series:
+        series = Series()
     params = gitutil.LogCmd(commit_range,reverse=True, count=count,
                             git_dir=git_dir)
     stdout = command.RunPipe([params], capture=True).stdout
-- 
2.1.0.rc2.206.gedb03e5



More information about the U-Boot mailing list