Merge lp:~acsone-openerp/anybox.buildbot.openerp/trunk-bug-1284060-lmi into lp:anybox.buildbot.openerp

Proposed by Laurent Mignon (Acsone)
Status: Merged
Merged at revision: 299
Proposed branch: lp:~acsone-openerp/anybox.buildbot.openerp/trunk-bug-1284060-lmi
Merge into: lp:anybox.buildbot.openerp
Diff against target: 43 lines (+9/-5)
3 files modified
anybox/buildbot/openerp/tests/data/manifest_watch.cfg (+4/-0)
anybox/buildbot/openerp/tests/test_watch.py (+1/-1)
anybox/buildbot/openerp/watch.py (+4/-4)
To merge this branch: bzr merge lp:~acsone-openerp/anybox.buildbot.openerp/trunk-bug-1284060-lmi
Reviewer Review Type Date Requested Status
Georges Racinet Approve
Review via email: mp+207923@code.launchpad.net

Description of the change

[FIX] lp:1284060 Use the parameter 'branches' of the GitPoller to track multiple branches of the same repository

To post a comment you must log in.
Revision history for this message
Georges Racinet (gracinet) wrote :

Well done, thanks

For the record, there's a similar problem with Mercurial, but it lies upstream, in buildbot's HgPoller (I have to submit a patch there)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'anybox/buildbot/openerp/tests/data/manifest_watch.cfg'
2--- anybox/buildbot/openerp/tests/data/manifest_watch.cfg 2013-10-27 10:58:21 +0000
3+++ anybox/buildbot/openerp/tests/data/manifest_watch.cfg 2014-02-24 13:14:53 +0000
4@@ -15,3 +15,7 @@
5 buildout = standalone buildouts/7.0.cfg
6 watch = git user@git.example:my/repo master
7
8+[w_git_develop]
9+buildout = standalone buildouts/7.0.cfg
10+watch = git user@git.example:my/repo develop
11+
12
13=== modified file 'anybox/buildbot/openerp/tests/test_watch.py'
14--- anybox/buildbot/openerp/tests/test_watch.py 2013-10-27 12:07:45 +0000
15+++ anybox/buildbot/openerp/tests/test_watch.py 2014-02-24 13:14:53 +0000
16@@ -25,7 +25,7 @@
17 # BzrPoller does translation of lp: addresses
18 self.assertTrue(bzr.url.endswith('openobject-server/6.1'))
19 self.assertEquals(git.repourl, 'user@git.example:my/repo')
20- self.assertEquals(git.branches[0], 'master')
21+ self.assertEquals(sorted(git.branches), ['develop', 'master'])
22
23 def test_url_rewrite(self):
24 updater = self.watcher(
25
26=== modified file 'anybox/buildbot/openerp/watch.py'
27--- anybox/buildbot/openerp/watch.py 2013-10-26 19:59:56 +0000
28+++ anybox/buildbot/openerp/watch.py 2014-02-24 13:14:53 +0000
29@@ -85,10 +85,10 @@
30 yield BzrPoller(url, poll_interval=poll_interval,
31 branch_name=branch_name)
32 elif vcs == 'git':
33- for ms in minor_specs:
34- yield GitPoller(url, branch=ms[0],
35- workdir=os.path.join('gitpoller', h),
36- pollInterval=poll_interval)
37+ branches = [ms[0] for ms in minor_specs]
38+ yield GitPoller(url, branches=branches,
39+ workdir=os.path.join('gitpoller', h),
40+ pollInterval=poll_interval)
41
42 def check_paths(self, paths):
43 missing = [path for path in paths if not os.path.isfile(path)]

Subscribers

People subscribed via source and target branches