Skip to content

Commit

Permalink
Merge branch 'master' of github.com:buildbot/buildbot
Browse files Browse the repository at this point in the history
* 'master' of github.com:buildbot/buildbot:
  GerritChangeSource should set repository attribute
  • Loading branch information
djmitche committed Feb 23, 2012
2 parents 2011811 + faa6694 commit bcbb713
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions master/buildbot/changes/gerritchangesource.py
Expand Up @@ -125,6 +125,8 @@ def eventReceived_patchset_created(self, properties, event):
return self.addChange(dict(
author="%s <%s>" % (change["owner"]["name"], change["owner"]["email"]),
project=change["project"],
repository="ssh://%s@%s:%s/%s" % (
self.username, self.gerritserver, self.gerritport, change["project"]),
branch=change["branch"]+"/"+change["number"],
revision=event["patchSet"]["revision"],
revlink=change["url"],
Expand All @@ -142,6 +144,8 @@ def eventReceived_ref_updated(self, properties, event):
return self.addChange(dict(
author=author,
project=ref["project"],
repository="ssh://%s@%s:%s/%s" % (
self.username, self.gerritserver, self.gerritport, ref["project"]),
branch=ref["refName"],
revision=ref["newRev"],
comments="Gerrit: patchset(s) merged.",
Expand Down
Expand Up @@ -63,6 +63,7 @@ def check(_):
self.assertEqual(c['branch'], "br/4321")
self.assertEqual(c['revision'], "abcdef")
self.assertEqual(c['revlink'], "http://buildbot.net")
self.assertEqual(c['repository'], "ssh://someuser@somehost:29418/pr")
self.assertEqual(c['comments'], "fix 1234")
self.assertEqual(c['files'], [ 'unknown' ])
self.assertEqual(c['properties']['event.change.subject'], 'fix 1234')
Expand Down

0 comments on commit bcbb713

Please sign in to comment.