我的SVN版本庫佈局...Buildbot和多SVN分行
Project_Name(root)/trunk
/branches/
/branches/new_feature_of_trunk1
/branches/new_feature_of_trunk2
/tags/
/tags/ETC1
/tags/ETC2
我試圖讓buildbot打造我的倉庫例如像幾家分公司... /樹幹和/分支機構/ new_feature_of_trunk1。這是我如何編碼它
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
)
)
問題是這樣的..我知道我加了defaultBranch ='trunk'。但爲什麼只有結帳中繼線 不是整個根?然後每當我刪除它defaultBranch。我得到這個錯誤
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.
然後我發佈的代碼是我buildmaster的告訴奴隸建造如果在/樹幹modified_files或/分支機構/ new_feature_of_trunk1 ..如果有在同一SVN兩個分支被修改修訂。然後它會編譯/主幹第一前/分支機構/ new_feature_of_trunk1 ...
但正如我所說 它並不像我想