My SVN Repository Layout...
Project_Name(root)/trunk
/branches/
/branches/new_feature_of_trunk1
/branches/new_feature_of_trunk2
/tags/
/tags/ETC1
/tags/ETC2
i was trying to make buildbot to build several branches of my repository like for example... /trunk and /branches/new_feature_of_trunk1 .This is how i code it
from buildbot.changes.svnpoller import SVNPoller, split_file_branches
source_code_svn_url='http://domain.com/svn/Project_Name/'
c['change_source'].append(
SVNPoller(
svnurl=source_code_svn_url,
split_file=split_file_branches,
pollinterval=60,
histmax=10,
)
)
def modified_files(change):
for name in change.files:
if name.endswith(".c"):
return True
elif name.endswith(".h"):
return True
return False
from buildbot import scheduler
from buildbot.changes.filter import ChangeFilter
s1=scheduler.AnyBranchScheduler(
name="Project_Test",
treeStableTimer=2*60,
change_filter=ChangeFilter(
branch=[
'trunk',
'branches/new_feature_of_trunk1'
]
),
builderNames=[
"Windows-x64-VS10",
],
fileIsImportant=modified_files
)
c['schedulers']=[s1]
from buildbot.process import factory
from buildbot.steps import source,shell
from buildbot.process.properties import WithProperties
from buildbot.config import BuilderConfig
step_source_svn=source.SVN(
mode='copy',
baseURL=source_code_svn_url,
defaultBranch='trunk',
retry=(30,2)
)
f2=factory.BuildFactory()
f2.addStep(step_source_svn)
f2.addStep(
shell.Compile(
command=[
"devenv.com",
"MakeMe.sln",
"/build",
"Release^|Win32"
],
logEnviron=False
)
)
The problem is this.. i know i added defaultBranch='trunk'. but why it only checkout trunk not the whole root? then whenever i remove it defaultBranch. i got this error
exceptions.RuntimeError: The SVN source step belonging to builder 'Windows-x64-VS10' does not know which branch to work with. This means that the change source did not specify a branch and that defaultBranch is None.
then the code i posted is for my buildmaster to tell the slave to build if there is modified_files in /trunk or /branches/new_feature_of_trunk1.. if there is modified in both branches in same SVN Revision. then it will compile /trunk first before /branches/new_feature_of_trunk1...
but as what i said it doesn't work like what i want