title: How to trigger a build for any branch in buildbot
body: <p>I am using <code>buildbot</code> in a project and I have a setup of a scheduler, that automatically builds the project every time when there is a change, to test whether it compiles fine. This works and buildbot detects the changes on all branches but the scheduler always builds the <code>master</code> branch, no matter which branch the change is on. I want it to build the branch that the change is on but I have trouble making that work. Here are the relevant parts of the buildbot configuration:</p>
  
  <p>GitPoller:</p>
  
  <pre><code>c['change_source'].append(GitPoller(
      repourl='git@git.somewhere.com:someproject.git',
      branches=True,
      pollinterval=60))
  </code></pre>
  
  <p>Scheduler:</p>
  
  <pre><code>c['schedulers'].append(AnyBranchScheduler(
      name='all',
      treeStableTimer=2*60,
      builderNames=['builder 1', 'builder 2']))
  </code></pre>
  
  <p>This is a helper function that I use on several builders to checkout the code. I am almost always calling it with no parameters. Using the parameter is a rare case for a specific branch, and the above scheduler does not run such a builder. I assume that when I use no parameters, I am always running in the <code>else</code> block:</p>
  
  <pre><code>def CheckoutFactory(whichBranch = ''):
      factory = BuildFactory()
      if whichBranch:
          factory.addStep(Git(repourl='git@git.somewhere.com:someproject.git', branch=whichBranch, mode='full', method='fresh', alwaysUseLatest=True, progress=True))
      else:
          factory.addStep(Git(repourl='git@git.somewhere.com:someproject.git', mode='full', method='fresh', alwaysUseLatest=True, progress=True))
      return factory
  </code></pre>
  
  <p>What is wrong here? Am I doing something wrong and how do I make buildbot run the builds on the branches with the changes?</p>
  
  <p>Configuration:</p>
  
  <ul>
  <li>The buildbot master is running on XUbuntu <code>16.04.1</code> 64-bit.</li>
  <li>The buildbot version is <code>0.8.12</code>. (from the repos)</li>
  <li>Git is version <code>2.7.4</code>. (from the repos)</li>
  </ul>