[Buildbot-devel] Suggestion and question

Dustin J. Mitchell dustin at v.igoro.us
Sat May 28 15:15:38 UTC 2011


On Fri, May 27, 2011 at 3:17 PM, Evan Driscoll <driscoll at cs.wisc.edu> wrote:
> What about an error check in the Scheduler's __init__ that 'branches' is
> either not a ChangeFilter, or *is* a string or list?

This is not a bad idea - can you submit a bug, preferably with a patch
that does this?

> I've attached a sanitized version of my master.cfg, but I highlight most of
> the important bits below.
>
> I ran into another weird question. At the top of my master.cfg, I have a
> variable holding my SVN url (actually I have several, but let's stick with
> this):
>
>  repo_url='svn+ssh://.../svn'
>
> I use this variable in my change source:
>
>  SVNPoller(repo_url,
>            split_file = split_file_branches,
>            pollinterval=vcs_poll_interval_sec),
>
> And in my ChangeFilter:
>
>  repo_change = ChangeFilter(repository=repo_url, branch=['trunk'])
>
>  AnyBranchScheduler('change',
>                     change_filter=repo_change,
>                     builderNames=['continuous'],
>                     treeStableTimer=vcs_tree_stable_timer_sec),
>
> And in the build step to check it out:
>
>  continuous_factory = BuildFactory([
>    SVN(baseURL=repo_url,
>        mode='update',
>        defaultBranch='trunk'),
>    Compile(command='scons'),
>    Trigger(schedulerNames=['full'])
>    ])
>
>
> (Note: I have a custom split_file_branches just like the standard one except
> it returns 'trunk' for the trunk instead of None.)
>
>
> The problem is that when I committed, it tried to check out
>   svn+ssh://...../svntrunk
>
> In other words, it omitted the / in there. I used to have the trailing / in
> repo_url itself, but I removed it because it was causing the ChangeFilter to
> fail (it was looking for the repository with the /, but the / was getting
> stripped in the change stamp).
>
> So right now I explicitly add it at the checkout step:
>
>    SVN(baseURL=repo_url + '/',
>        mode='update',
>        defaultBranch='trunk'),
>
> But this seems ugly.
>
> What am I doing wrong? Is my treatment of 'trunk' as a branch throwing
> things off?

I think you have the right temporary fix here, but we should probably
make this "just work" with the same URL everywhere.  Can you file a
bug?

Dustin




More information about the devel mailing list