summaryrefslogtreecommitdiff
path: root/gbp/git/repository.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-04-27 00:12:26 +0200
committerGuido Günther <agx@sigxcpu.org>2013-04-27 00:12:26 +0200
commit3fd12f4e334f62ed1d129e1330a10a1a1cf4aeb8 (patch)
tree44e4a512e67f0188d0f97059c8cada0c360d294f /gbp/git/repository.py
parent3c9d10e04c1604a4b6846154941528daba2bcffb (diff)
Silence GitRepository.grep_log
None of the gbp script rely on the output being printed. In fact we improve the exception by appending the stderr output.
Diffstat (limited to 'gbp/git/repository.py')
-rw-r--r--gbp/git/repository.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 1c8ea9c..b1e7795 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1349,10 +1349,15 @@ class GitRepository(object):
args.append(since)
args.append('--')
- commits, ret = self._git_getoutput('log', args)
+ stdout, stderr, ret = self._git_inout('log', args,
+ capture_stderr=True)
if ret:
- raise GitRepositoryError("Error grepping log for %s" % regex)
- return [ commit.strip() for commit in commits[::-1] ]
+ raise GitRepositoryError("Error grepping log for %s: %s" %
+ (regex, stderr[:-1]))
+ if stdout:
+ return [ commit.strip() for commit in stdout.split('\n')[::-1] ]
+ else:
+ return []
def get_subject(self, commit):
"""