Skip to content

Commit

Permalink
gerritchangesource: use gerrit's changeid as the branch
Browse files Browse the repository at this point in the history
in order to make one build by change (and not concatenate)
also update the unittest

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy authored and djmitche committed Jul 8, 2011
1 parent e2a8cf4 commit ccf6c11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/changes/gerritchangesource.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def flatten(event, base, d):
chdict = dict(
author="%s <%s>" % (change["owner"]["name"], change["owner"]["email"]),
project=change["project"],
branch=change["branch"],
branch=change["branch"]+"/"+change["number"],
revision=event["patchSet"]["revision"],
revlink=change["url"],
comments=change["subject"],
Expand Down
3 changes: 2 additions & 1 deletion master/buildbot/test/unit/test_changes_gerritchangesource.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_lineReceived_patchset_created(self):
change=dict(
branch="br",
project="pr",
number="4321",
owner=dict(name="Dustin", email="dustin@mozilla.com"),
url="http://buildbot.net",
subject="fix 1234"
Expand All @@ -59,7 +60,7 @@ def check(_):
c = self.changes_added[0]
self.assertEqual(c['author'], "Dustin <dustin@mozilla.com>")
self.assertEqual(c['project'], "pr")
self.assertEqual(c['branch'], "br")
self.assertEqual(c['branch'], "br/4321")
self.assertEqual(c['revision'], "abcdef")
self.assertEqual(c['revlink'], "http://buildbot.net")
self.assertEqual(c['comments'], "fix 1234")
Expand Down

0 comments on commit ccf6c11

Please sign in to comment.