Skip to content

Commit

Permalink
Merge branch 'git-buildbot-fixes' of git://github.com/dottedmag/buildbot
Browse files Browse the repository at this point in the history
* 'git-buildbot-fixes' of git://github.com/dottedmag/buildbot:
  Pass un-mangled git commit message to the buildbot
  • Loading branch information
djmitche committed Sep 5, 2011
2 parents 84aa24e + ad072aa commit 5eaa6f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion master/contrib/git_buildbot.py
Expand Up @@ -118,12 +118,16 @@ def grab_commit_info(c, rev):
f = os.popen("git show --raw --pretty=full %s" % rev, 'r')

files = []
comments = []

while True:
line = f.readline()
if not line:
break

if line.startswith(4*' '):
comments.append(line[4:])

m = re.match(r"^:.*[MAD]\s+(.+)$", line)
if m:
logging.debug("Got file: %s" % m.group(1))
Expand All @@ -138,6 +142,7 @@ def grab_commit_info(c, rev):
if re.match(r"^Merge: .*$", line):
files.append('merge')

c['comments'] = ''.join(comments)
c['files'] = files
status = f.close()
if status:
Expand All @@ -154,7 +159,6 @@ def gen_changes(input, branch):

m = re.match(r"^([0-9a-f]+) (.*)$", line.strip())
c = {'revision': m.group(1),
'comments': unicode(m.group(2), encoding=encoding),
'branch': unicode(branch, encoding=encoding),
}

Expand Down

0 comments on commit 5eaa6f6

Please sign in to comment.