[Buildbot-commits] [Buildbot] #2406: GerritChangeSource & ChangeFilter issue:only 1 git project ChangeFilter can receive change using GerritChangeSource

Buildbot nobody at buildbot.net
Wed Dec 5 05:59:09 UTC 2012


#2406: GerritChangeSource & ChangeFilter issue:only 1 git project ChangeFilter can
receive change using GerritChangeSource
----------------------------+------------------------
Reporter:  clino            |       Owner:
    Type:  support-request  |      Status:  closed
Priority:  minor            |   Milestone:  undecided
 Version:  0.8.7            |  Resolution:  fixed
Keywords:  gerrit           |
----------------------------+------------------------

Comment (by clino):

 I found that python closure only use with function parameter,so I modify
 like below,and test it OK now.
 Thanks!
 {{{
             if b["stype"]=="everycommit":
                 rpath = b["repository_url"].split(":")[-1]
                 def add_schedulers(appname):
                     def repository_match(repository):
                         return repository.find(appname)!=-1

                     s = SingleBranchScheduler(
                         name="%s_everycommit"%(buildername),
 change_filter=filter.ChangeFilter(branch=b["repository_branch"],repository_fn=repository_match),
                         treeStableTimer=3,
                         builderNames=[buildername])
                     l.append(s)
                 add_schedulers(rpath)
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2406#comment:10>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list