summaryrefslogtreecommitdiff
path: root/tools/patman/gitutil.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-11-06 11:27:14 -0500
committerTom Rini <trini@konsulko.com>2020-11-06 11:27:14 -0500
commit22ad69b7987eb4b10221330661db4427e40174fb (patch)
treeb13bc4ba708907cd76a0ec09c4599b55cb586953 /tools/patman/gitutil.py
parent896cc5aa4a8fc0c28036b9615a37f0034addad44 (diff)
parentdc4b2a9770b5b932cd6d98c33ebff6dc46de6849 (diff)
Merge tag 'dm-pull5nov20' of git://git.denx.de/u-boot-dm
patman status subcommand to collect tags from Patchwork patman showing email replies from Patchwork sandbox poweroff command minor fixes in binman, tests
Diffstat (limited to 'tools/patman/gitutil.py')
-rw-r--r--tools/patman/gitutil.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 27a0a9fbc1f..3a2366bcf59 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -66,9 +66,13 @@ def CountCommitsToBranch(branch):
rev_range = '%s..%s' % (us, branch)
else:
rev_range = '@{upstream}..'
- pipe = [LogCmd(rev_range, oneline=True), ['wc', '-l']]
- stdout = command.RunPipe(pipe, capture=True, oneline=True).stdout
- patch_count = int(stdout)
+ pipe = [LogCmd(rev_range, oneline=True)]
+ result = command.RunPipe(pipe, capture=True, capture_stderr=True,
+ oneline=True, raise_on_error=False)
+ if result.return_code:
+ raise ValueError('Failed to determine upstream: %s' %
+ result.stderr.strip())
+ patch_count = len(result.stdout.splitlines())
return patch_count
def NameRevision(commit_hash):