Version 1 (modified by simon, 19 years ago) (diff) |
---|
SvnBot Design
Communication
SvnBot is controlled by sending it method calls using XML-RPC, an XML based encoding for remote procedure calls (RPC) over HTTP. An XML-RPC client connects to SvnBot, sends a command to it, and SvnBot obeys by sending something to an IRC channel. In Python, this is really simple to do. Just instantiate a server object to connect to the bot, then call any method on that object to make it do something, like so:
import xmlrpclib, sys s = xmlrpclib.Server('http://localhost:7080/') s.showCommitSummary('123', 'simon')
If the above code seems familiar, it is probably because it is what the simplest Subversion hook script for SvnBot does!