[Buildbot-devel] Svnpoller with externals

Matisse Enzer menzer at apple.com
Tue Apr 29 16:53:42 UTC 2008


Here is a new idea that sort of touches on  this issue of using  
buildbot with SVN externals:

- We have two repositories,  RepoA and RepoB.
- We have a project in RepoA that uses files from RepoB.
- We would would like to set up RepoA like this:

   https://repoA/svn/trunk/project-puffball/
       reference_files/       svn:externals set on this dir
          svn+ssh://repoB/trunk/some-code/
          svn+ssh://repoB/trunk/more-code/

Then, in buildbot we have three change sources defined which poll:

   https://repoA/svn/trunk/project-puffball/
   svn+ssh://repoB/trunk/some-code/
   svn+ssh://repoB/trunk/more-code/

and our build factories have as their first step:

    f1.addStep(source.SVN,
               baseURL="https://repoA/svn/trunk/project-puffball/",
	      defaultBranch="",
               mode="clobber")

The ALMOST works.

What happens is that when a commit happens inside one of the external  
directories (in RepoB) the poller does see it, and a build does get  
triggered, but, the SVNPoller reports the revision number from repoB  
(which is reasonable) but the factory tries to use that revision  
number during the checkout from repoA which is wrong.

So, a possible solution, that i am looking for feedback on:

- We create a subclass of SVNPoller that overrides the constructor and  
create_changes.
- The sub-class constructor takes an additional svn URL:  
revision_number_from_svnurl
- The sub-class create_changes() gets the revision number of the  
revision_number_from_svnurl
   and then calls the super class create_changes() and then
   iterates over the changes, replacing the revision with the number  
from revision_number_from_svnurl.

What do you all think of this?

-Matisse






More information about the devel mailing list