[Buildbot-devel] Git source picking wrong branch
Amber Yust
ayust at yelp.com
Thu Jul 28 23:42:14 UTC 2011
Oh, I see now - 4 git sources in the same build. We don't really support
multiple source steps in the same builder that well.
~Amber (sent from Droid, please forgive any typos!)
On Jul 28, 2011 4:39 PM, "Amber Yust" <ayust at yelp.com> wrote:
> Why would you want a commit to master to trigger a build of a non master
> branch?
>
> Perhaps what you should actually do is put change filters on your
schedulers
> so that they don't all build when only one of the repositories had a
commit.
>
> ~Amber (sent from Droid, please forgive any typos!)
> On Jul 28, 2011 4:33 PM, "Sean Cross" <sean at chumby.com> wrote:
>> I'm experiencing a problem where source.Git is grabbing the wrong branch
> when a build is triggered from GitPoller.
>>
>> My particular factory has four Git sources. Three have "branch" set to
> "master", and one has "branch" set to "org.openembedded.dev". When I
trigger
> a build using the web interface, "branch" is set to None, and everything
> works. When GitPoller detects a change, it seems to set build's "branch"
> property to the branch that changed, usually "master".
>>
>> Naturally, this causes builds triggered by GitPoller to fail as my
> openembedded tree has no "master" branch.
>>
>> I've applied this patch, but I don't understand why it works, or what the
> correct solution is. How can I make it so that builds triggered from
> GitPoller don't set the "branch" value, or so the Git source uses the
> correct branch?
>>
>> diff -ur buildbot-0.8.4p2-stock/buildbot/steps/source.py
> buildbot-0.8.4p2/buildbot/steps/source.py
>> --- buildbot-0.8.4p2-stock/buildbot/steps/source.py 2011-07-17
> 12:49:06.000000000 +0800
>> +++ buildbot-0.8.4p2/buildbot/steps/source.py 2011-07-29
> 06:49:53.000000000 +0800
>> @@ -228,7 +228,7 @@
>> # what source stamp would this build like to use?
>> s = self.build.getSourceStamp()
>> # if branch is None, then use the Step's "default" branch
>> - branch = s.branch or self.branch
>> + branch = self.branch or s.branch
>> # if revision is None, use the latest sources (-rHEAD)
>> revision = s.revision
>> if not revision and not self.alwaysUseLatest:
>>
>>
>>
>
------------------------------------------------------------------------------
>> Got Input? Slashdot Needs You.
>> Take our quick survey online. Come on, we don't ask for help often.
>> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
>> http://p.sf.net/sfu/slashdot-survey
>> _______________________________________________
>> Buildbot-devel mailing list
>> Buildbot-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20110728/6dfbd7e3/attachment.html>
More information about the devel
mailing list