[Buildbot-devel] client-side subversion ChangeSource?
John Pye
john.pye at student.unsw.edu.au
Wed Mar 15 03:41:40 UTC 2006
Hi,
Can anyone offer me some suggestions on how to get the following
working? I want to be able to pull down changesets from our subversion
repository, but I want to do that by running the 'svn log' command
locally and then telling buildbot what the current revision status is.
I've made a start here, with a hacky little python script:
#!/usr/bin/python
import commands
import xml.dom.minidom
xml1 = commands.getoutput("svn log --non-interactive --verbose --xml
--limit=1 https://pse.cheme.cmu.edu/svn/ascend/code/trunk")
print "XML\n-----------\n"+xml1+"\n\n"
doc = xml.dom.minidom.parseString(xml1)
el = doc.getElementsByTagName("logentry")[0]
revision = el.getAttribute("revision")
author = "".join([t.data for t in
el.getElementsByTagName("author")[0].childNodes])
comments = "".join([t.data for t in
el.getElementsByTagName("msg")[0].childNodes])
pathlist = el.getElementsByTagName("paths")[0]
paths = []
for p in pathlist.getElementsByTagName("path"):
paths.append("".join([t.data for t in p.childNodes]))
print "PATHS"
print paths
cmd = "buildbot sendchange --master=cruncher2.dyndns.org:9989
--revision=\""+revision+"\" --username=\""+author+"\"
--comments=\""+comments+"\" "+" ".join(paths)
print cmd
The above manages to print out my latest revision, username and file
list. But for some reason buildbot won't eat it.
Also, what happens if I keep submitting the same revision to buildbot
over and over? It keeps building over and over, or it realises that it's
received a repeat?
I figured that if I get this to work I can track the 'lastest' revision
and go back and submit earlier revisions to the buildbot queue if any
have been missed inbetween runs of my little script.
Is this whole thing a bad idea -- should I really focus on getting
something running on the subversion server like a post-commit hook?
Cheers
JP
--
John Pye
School of Mechanical and Manufacturing Engineering
The University of New South Wales
Sydney NSW 2052 Australia
t +61 2 9385 5127
f +61 2 9663 1222
mailto:john.pye_AT_student_DOT_unsw.edu.au
http://pye.dyndns.org/
More information about the devel
mailing list