Skip to content

Commit

Permalink
Fix GitPoller setting invalid branch (PR #1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k committed Apr 19, 2014
2 parents f0bcdb2 + 9101ef0 commit 4314678
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/changes/gitpoller.py
Expand Up @@ -281,7 +281,7 @@ def _process_changes(self, newRev, branch):
files=files,
comments=comments,
when_timestamp=epoch2datetime(timestamp),
branch=branch,
branch=self._removeHeads(branch),
category=self.category,
project=self.project,
repository=self.repourl,
Expand Down
9 changes: 3 additions & 6 deletions master/buildbot/test/unit/test_changes_gitpoller.py
Expand Up @@ -498,8 +498,7 @@ def cb(_):
self.assertEqual(self.changes_added[0]['when_timestamp'],
epoch2datetime(1273258009))
self.assertEqual(self.changes_added[0]['comments'], 'hello!')
self.assertEqual(self.changes_added[0]['branch'],
'refs/heads/master')
self.assertEqual(self.changes_added[0]['branch'], 'master')
self.assertEqual(self.changes_added[0]['files'], ['/etc/442'])
self.assertEqual(self.changes_added[0]['src'], 'git')

Expand Down Expand Up @@ -631,8 +630,7 @@ def cb(_):
self.assertEqual(self.changes_added[0]['when_timestamp'],
epoch2datetime(1273258009))
self.assertEqual(self.changes_added[0]['comments'], 'hello!')
self.assertEqual(self.changes_added[0]['branch'],
'refs/heads/master')
self.assertEqual(self.changes_added[0]['branch'], 'master')
self.assertEqual(self.changes_added[0]['files'], ['/etc/442'])
self.assertEqual(self.changes_added[0]['src'], 'git')

Expand Down Expand Up @@ -729,8 +727,7 @@ def cb(_):
self.assertEqual(self.changes_added[0]['when_timestamp'],
epoch2datetime(1273258009))
self.assertEqual(self.changes_added[0]['comments'], 'hello!')
self.assertEqual(self.changes_added[0]['branch'],
'refs/heads/master')
self.assertEqual(self.changes_added[0]['branch'], 'master')
self.assertEqual(self.changes_added[0]['files'], ['/etc/442'])
self.assertEqual(self.changes_added[0]['src'], 'git')

Expand Down
2 changes: 2 additions & 0 deletions master/docs/relnotes/index.rst
Expand Up @@ -194,6 +194,8 @@ Refer to the documentation for previous versions for infrormation on old-style s
Fixes
~~~~~

* Fixes an issue where :bb:chsrc:`GitPoller` sets the change branch to ``refs/heads/master`` - which isn't compatible with :bb:step:`Git` (:bb:pull:`1069`).

* Fixed an issue where the :bb:step:`Git` and :bb:step:`CVS` source steps silently changed the ``workdir`` to ``'build'`` when the 'copy' method is used.

* The :bb:step:`CVS` source step now respects the timeout parameter.
Expand Down

0 comments on commit 4314678

Please sign in to comment.