From 7208396bbf1df1c7a85d263b7ff054e6b45d8240 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 24 Jul 2020 08:42:06 -0400 Subject: Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini --- tools/patman/patchstream.py | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) (limited to 'tools/patman/patchstream.py') diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index ba0a13f632..4fe465e9ab 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -37,7 +37,7 @@ re_change_id = re.compile('^Change-Id: *(.*)') re_commit_tag = re.compile('^Commit-([a-z-]*): *(.*)') # Commit tags that we want to collect and keep -re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Patch-cc|Fixes): (.*)') +re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Patch-cc): (.*)') # The start of a new commit in the git log re_commit = re.compile('^commit ([0-9a-f]*)$') @@ -112,15 +112,6 @@ class PatchStream: self.in_section = 'commit-' + name self.skip_blank = False - def AddCommitRtag(self, rtag_type, who): - """Add a response tag to the current commit - - Args: - key: rtag type (e.g. 'Reviewed-by') - who: Person who gave that rtag, e.g. 'Fred Bloggs ' - """ - self.commit.AddRtag(rtag_type, who) - def CloseCommit(self): """Save the current commit into our commit list, and reset our state""" if self.commit and self.is_log: @@ -269,10 +260,6 @@ class PatchStream: else: self.section.append(line) - # If we are not in a section, it is an unexpected END - elif line == 'END': - raise ValueError("'END' wihout section") - # Detect the commit subject elif not is_blank and self.state == STATE_PATCH_SUBJECT: self.commit.subject = line @@ -351,9 +338,6 @@ class PatchStream: elif name == 'changes': self.in_change = 'Commit' self.change_version = self.ParseVersion(value, line) - else: - self.warn.append('Line %d: Ignoring Commit-%s' % - (self.linenum, name)) # Detect the start of a new commit elif commit_match: @@ -362,14 +346,12 @@ class PatchStream: # Detect tags in the commit message elif tag_match: - rtag_type, who = tag_match.groups() - self.AddCommitRtag(rtag_type, who) # Remove Tested-by self, since few will take much notice - if (rtag_type == 'Tested-by' and - who.find(os.getenv('USER') + '@') != -1): + if (tag_match.group(1) == 'Tested-by' and + tag_match.group(2).find(os.getenv('USER') + '@') != -1): self.warn.append("Ignoring %s" % line) - elif rtag_type == 'Patch-cc': - self.commit.AddCc(who.split(',')) + elif tag_match.group(1) == 'Patch-cc': + self.commit.AddCc(tag_match.group(2).split(',')) else: out = [line] @@ -530,19 +512,17 @@ def GetMetaDataForList(commit_range, git_dir=None, count=None, ps.Finalize() return series -def GetMetaData(branch, start, count): +def GetMetaData(start, count): """Reads out patch series metadata from the commits This does a 'git log' on the relevant commits and pulls out the tags we are interested in. Args: - branch: Branch to use (None for current branch) - start: Commit to start from: 0=branch HEAD, 1=next one, etc. + start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - return GetMetaDataForList('%s~%d' % (branch if branch else 'HEAD', start), - None, count) + return GetMetaDataForList('HEAD~%d' % start, None, count) def GetMetaDataForTest(text): """Process metadata from a file containing a git log. Used for tests -- cgit v1.2.3