[Buildbot-devel] client-side subversion ChangeSource?
John Pye
john.pye at student.unsw.edu.au
Wed Mar 15 04:00:17 UTC 2006
Sorry, I forgot to put in what the error message was. Running the 'cmd'
that gets output by my script, I see:
> [buildslave at cruncher2 ~]$ buildbot sendchange
> --master=cruncher2.dyndns.org:9989 --revision="445"
> --username="johnpye" --comments="Fixing script"
> /code/trunk/pygtk/interface/configure.in
> change NOT sent
> [Failure instance: Traceback from remote host -- Traceback (most
> recent call last):
> File "/usr/lib/python2.4/site-packages/twisted/spread/pb.py", line
> 1734, in remote_respond
> d = self.portalWrapper.portal.login(self, mind, IPerspective)
> File "/usr/lib/python2.4/site-packages/twisted/cred/portal.py", line
> 94, in login
> return maybeDeferred(c.requestAvatarId, credentials
> File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
> line 214, in addCallback
> callbackKeywords=kw)
> File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
> line 205, in addCallbacks
> self._runCallbacks()
> --- <exception caught here> ---
> File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
> line 338, in _runCallbacks
> self.result = callback(self.result, *args, **kw)
> File "/usr/lib/python2.4/site-packages/buildbot/master.py", line
> 529, in requestAvatar
> p = self.botmaster.getPerspective(avatarID)
> File "/usr/lib/python2.4/site-packages/buildbot/master.py", line
> 402, in getPerspective
> return self.slaves[slavename]
> exceptions.KeyError: 'change'
> ]
Any ideas?
John Pye wrote:
> 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