[Otfbot-dev] [Git] OTFBot branch, v1.0, updated. 1.0-beta3-1106-g30b432c

git version control gitrepo at otfbot.org
So Nov 7 15:56:05 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OTFBot".

The branch, v1.0 has been updated
       via  30b432c7b96fad7a7412182b97083b7ad79f8e25 (commit)
       via  fed1f059a87dabc2a0797722537bbed329576a53 (commit)
       via  279d80ce02fa35e4aeaa484271e8a0b69414196c (commit)
       via  575609c8e7913e70fe4904aba4601102a3165e96 (commit)
       via  dbac12064d47b0c0891c426600341c6074f5af95 (commit)
       via  a33ffe36395d9dc5d72ab880c56cf50ef30b0e80 (commit)
       via  716fb5133cfb6ee15d006c99cdbdbedc14e212c6 (commit)
       via  e5235b9f614a96388a1807c71888945a26f0b6f7 (commit)
       via  851e54c7e496c31509a07c9c8cce747adcbfe60e (commit)
       via  893cb9e33196873e50a7cc55e6d7da8a8418a098 (commit)
       via  d1dfab7cf123b334c9be15899fb39a56fa4d69e8 (commit)
       via  fb4032d001faf2a1bbd3dfebc49085050017ca6c (commit)
       via  f8cc4550690a2b079485d76d8bf8aa38a6cf3b1f (commit)
       via  ff6a46418082a612d107eb092576ef90d599b52d (commit)
       via  74ff50fb9809fcca7b0ca457d7961636e9e8980d (commit)
       via  cb757d820d0fb2a33fc607b8e0c90ea51ca85bd5 (commit)
       via  55fe84025d1e06b0314734c19a70fcf5a7452e3b (commit)
       via  cd9a058b23fb82ff45ae05698f2804386019825f (commit)
      from  3fd5f07bcc3657fe5a60319831da3ea0db2b7dd5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 30b432c7b96fad7a7412182b97083b7ad79f8e25
Author: allo <allo at laxu.de>
Date:   Sun Nov 7 15:54:20 2010 +0100

    removed tcpServer and svn-push from 1.0 release

diff --git a/otfbot/plugins/ircClient/svn-push.py b/otfbot/plugins/ircClient/svn-push.py
deleted file mode 100644
index d5ecf8d..0000000
--- a/otfbot/plugins/ircClient/svn-push.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# This file is part of OtfBot.
-#
-# OtfBot is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# OtfBot is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OtfBot; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-# (c) 2010 by Finn Wilke
-#
-
-"""
-    This module gets notified by tcpServer.svn whenever a subversion
-    repository gets updated. It then posts the commit information
-    to the channel specified in the config.
-"""
-
-import logging
-from otfbot.lib import chatMod
-from otfbot.lib.pluginSupport.decorators import callback
-
-HAS_PYSVN = True
-try:
-    import pysvn
-except ImportError:
-    HAS_PYSVN = False
-
-
-class Plugin(chatMod.chatMod):
-    """
-        svn-push plugin
-
-        Configuration:
-        You need to set 'svn-push.networks' and 'svn-push.channels' if you
-        don't want to have the svn messages in all of the channels your bot
-        is in. Both configuration settings are of the "list" type
-    """
-    def __init__(self, bot):
-        """
-            Initialisation
-
-            Configuration:
-            You need to set 'main.svn-push.networks' and 'svn-push.channels'
-            (for each network) if you don't want to have the svn messages
-            in all of the channels your bot is in.
-            Both configuration settings are of the "list" type
-        """
-        self.bot = bot
-        self.bot.depends_on_module("pysvn")
-        self.logger = logging.getLogger("server")
-        self.ircClient = self.bot.root.getServiceNamed("ircClient")
-
-        networks = self.bot.config.get("svn-push.networks",
-                                       self.ircClient.namedServices.keys(),
-                                       "main")
-        if not self.bot.network in networks:
-            raise self.bot.WontStart("apparently it is not needed here...")
-
-        channels = self.bot.config.get("channels",
-                            self.bot.config.getChannels(self.bot.network),
-                            "svn-push",
-                            network=self.bot.network)
-        self.channels = []
-        for channel in channels:
-            if channel in self.bot.config.getChannels(self.bot.network):
-                self.channels.append(channel)
-            else:
-                self.logger.error("Channel '" + channel +
-                                  "' does not exist in network " +
-                                  self.bot.network +
-                                  ". Please check your config file.")
-        self.svnclient = pysvn.Client()
-
-        # mIRC (and other clients) variables
-        self.mirc_bold = chr(2)
-        self.mirc_green = chr(3) + "3"
-        self.mirc_no_color = chr(15)
-
-    def getRev(self, url, commit):
-        """ Gets revision information from the svn repo"""
-        revision = pysvn.Revision(pysvn.opt_revision_kind.number, commit)
-        return self.svnclient.log(url, revision, limit=1)[0]
-
-    def commit(self, url, commit):
-        """
-            Called from the tcpServer plugin when a new commit has been made
-
-            @param url: The url of the repository
-            @type url: string
-            @param commit: The commit revision
-            @type commit: int
-        """
-        log = self.getRev(url, commit)
-        for channel in self.channels:
-            self.bot.sendmsg(channel,
-                             "New commit by " +
-                             self.mirc_green + log['author'] +
-                             self.mirc_no_color + " (" +
-                             self.mirc_bold +
-                             "r" + str(log['revision'].number) +
-                             self.mirc_bold + "): " +
-                             log['message'])
-
-    def buildResult(self, url, commit, blame, result):
-        """
-            Called from the tcpServer plugin when a build result
-            needs to be posted
-
-            @param url: The url of the repository
-            @type url: string
-            @param commit: The commit revision
-            @type commit: int
-            @param result: The result of the build process.
-                           This can contain anything you want.
-            @type result: string
-        """
-        log = self.getRev(url, commit)
-        if blame:
-            result = result + " (" + self.mirc_green + log['author'] + self.mirc_no_color  + " commited)"
-        for channel in self.channels:
-            self.bot.sendmsg(channel,
-                             self.mirc_bold +
-                             "r" + str(log['revision'].number) +
-                             self.mirc_bold + " build result: " +
-                             result)
diff --git a/otfbot/plugins/tcpServer/__init__.py b/otfbot/plugins/tcpServer/__init__.py
deleted file mode 100644
index 20e01e4..0000000
--- a/otfbot/plugins/tcpServer/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""plugins for the tcpServer service"""
diff --git a/otfbot/plugins/tcpServer/svn-push.py b/otfbot/plugins/tcpServer/svn-push.py
deleted file mode 100644
index 6d5fc87..0000000
--- a/otfbot/plugins/tcpServer/svn-push.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# This file is part of OtfBot.
-#
-# OtfBot is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# OtfBot is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OtfBot; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-# (c) 2010 by Finn Wilke
-#
-
-"""
-    Listens on the LineRecieved events from tcpServer and talks to the
-    ircClient plugin "svn-push" to notify it of new commits
-"""
-
-from otfbot.lib.pluginSupport.decorators import callback
-from otfbot.lib.pluginSupport import plugin
-from otfbot.lib import chatMod
-import logging
-
-
-class Plugin(plugin.Plugin):
-    """
-        svn-push tcpServer plugin
-
-        You can find all settings for this module in the
-        ircClient.svn-push documentation
-    """
-    def __init__(self, bot):
-        self.bot = bot
-        self.logger = logging.getLogger("server")
-        self.bot.depends_on_service("ircClient",
-                description="This plugin needs the ircClient service to run")
-        self.bot.depends_on_plugin("svn-push",
-                description="This plugin needs ircClient.svn-push to work",
-                service="ircClient")
-        self.ircClient = bot.root.namedServices['ircClient']
-        self.networks = []
-        # check if networks have been configured, otherwise take all networks
-        networks = self.bot.config.get("svn-push.networks",
-                                      self.ircClient.namedServices.keys(),
-                                      "main")
-        for network in networks:
-            try:
-                self.networks.append(
-                    self.ircClient.namedServices[network])
-            except KeyError:
-                self.logger.error("Network " +
-                                  str(network) +
-                                  " does not exist. Please check \
-                                    your config file")
-
-        self.plugins = []
-        for network in self.networks:
-            try:
-                self.plugins.append(network.protocol.plugins['ircClient.svn-push'])
-            except KeyError:
-                self.logger.error("Network " +
-                                  network +
-                                  " does not have the svn-push plugin. \
-                                    Please check your config file")
-
-        if not self.plugins:
-            raise self.bot.WontStart("it doesn't have any ircClient.svn-push \
-                                      plugins connected to it")
-
-    @callback
-    def lineReceived(self, line):
-        """
-            Called when a line is received. Check if the commands are for this
-            plugin and call ircClient.svn-push when this is the case
-        """
-        plugin = line.split(" ", 1)
-        if plugin[0].lower() == "svn":
-            command = line.split(" ", 4)
-            if len(command) == 4 and command[1].lower() == "commit":
-                repo = command[2] # URL of the repository
-                try:
-                    commit = int(command[3]) # Revision number of the commit
-                except ValueError:
-                    self.logger.warn("Revision number not integer!")
-                self.logger.info("New commit on " + repo +
-                                 " with the revision " + str(commit))
-                for plugin in self.plugins:
-                    plugin.commit(repo, commit)
-
-            command = line.split(" ", 5)
-            if len(command) == 6 and command[1].lower() == "buildresult":
-                # result of automatic compilation (buildbot etc)
-                # the last argument can be multiple words
-                repo = command[2]
-                try:
-                    commit = int(command[3])
-                except ValueError:
-                    self.logger.warn("Revision number not integer!")
-                    return 1
-
-                # shall the ircClient plugin say who to blame for the commit?
-                if command[4] == "1":
-                    blame = True
-                else:
-                    blame = False
-
-                # build result of the compilation.
-                # The ircClient plugin cares about input validation here
-                result = command[5]
-
-                self.logger.info("New buildresult on " + repo + " r" +
-                                 str(commit) + ": " + result + " blame=" + str(blame))
-                for plugin in self.plugins:
-                    plugin.buildResult(repo, commit, blame, result)
diff --git a/otfbot/services/tcpServer.py b/otfbot/services/tcpServer.py
deleted file mode 100644
index d456f5b..0000000
--- a/otfbot/services/tcpServer.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# This file is part of OtfBot.
-#
-# OtfBot is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# OtfBot is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OtfBot; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-# (c) 2010 by Finn Wilke
-#
-
-"""
-    Provides a tcp server interface and makes it availiable through a unix
-    socket and a tcp listener
-"""
-
-from twisted.internet import protocol
-from twisted.internet.error import CannotListenError
-from twisted.internet.protocol import Factory, Protocol
-from twisted.internet.tcp import Server
-from twisted.protocols.basic import LineOnlyReceiver
-from twisted.application import internet, service
-
-import logging
-
-from otfbot.lib.pluginSupport import pluginSupport
-
-
-class botService(service.MultiService):
-    name = "tcpServer"
-
-    def __init__(self, root, parent):
-        self.root = root
-        self.parent = parent
-        self.logger = logging.getLogger("server")
-        self.logger.info("Starting listener[s]")
-        self.config = self.root.getServiceNamed('config')
-        service.MultiService.__init__(self)
-
-    def startService(self):
-        """
-            Starts the service. It supports a unix socket and a tcp networking
-            port. Configure it by setting tcpServer.modes in the config file:
-            socket, tcp
-
-            unix socket: You can set the path where the socket file is
-            created by setting tcpServer.socket.path to a filesystem path
-            writable by the bot user
-
-            tcp networking: You can set the port of the port of the connection
-            with tcpServer.tcp.port and the interface with
-            tcpServer.tcp.interface. Default is that the port is only
-            accessible from localhost.
-        """
-        modes = self.config.get("modes", ["socket"], "main.tcpServer")
-        self.factory = tcpServerFactory(self.root, self)
-        if "socket" in modes:
-            path = self.config.get("socket.path",
-                                   "otfbot.sock",
-                                   "main.tcpServer")
-            server = internet.UNIXServer(address=path, factory=self.factory)
-            self.addService(server)
-        if "tcp" in modes:
-            port = int(self.config.get("tcp.port", "7001", "main.tcpServer"))
-            interface = self.config.get("tcp.interface",
-                                        "127.0.0.1",
-                                        "main.tcpServer")
-            server = internet.TCPServer(port=port,
-                                        factory=self.factory,
-                                        interface=interface)
-            self.addService(server)
-        if "tcp" in modes or "socket" in modes:
-            try:
-                service.MultiService.startService(self)
-            except CannotListenError, e:
-                self.logger.warning(e)
-            except Exception, e:
-                self.logger.error(repr(e))
-                self.logger.error(e)
-
-
-class Server(LineOnlyReceiver, pluginSupport):
-    """
-        This is a very simple LineOnlyReceiver.
-        It only supports the callback lineReceived.
-    """
-    pluginSupportName = "tcpServer"
-    pluginSupportPath = "otfbot/plugins/tcpServer"
-
-    def __init__(self, root, parent):
-        self.root = root
-        self.parent = parent
-        self.logger = logging.getLogger("server")
-        self.logger.info("Starting new server")
-        pluginSupport.__init__(self, root, parent)
-        self.startPlugins()
-        self.logger.debug("All Plugins started")
-
-    def lineReceived(self, line):
-        """ This is called when a line is received """
-        self.logger.debug("Received line " + line)
-        if line.lower() == "quit":
-            return self.transport.loseConnection()
-        self._apirunner("lineReceived", {'line': line})
-
-    def connectionLost(self, reason):
-        self.logger.debug("connection lost")
-        self.parent.instances.remove(self)
-
-
-class tcpServerFactory(protocol.ServerFactory):
-    """
-        Factory for the tcpServer
-    """
-
-    def __init__(self, root, parent):
-        self.logger = logging.getLogger("server")
-        self.root = root
-        self.parent = parent
-        self.config = root.getServiceNamed('config')
-        self.instances = []
-        self.protocol = Server
-
-    def buildProtocol(self, addr):
-        self.instances.append(self.protocol(self.root, self))
-        return self.instances[-1]
-
-    def stopFactory(self):
-        pass
commit fed1f059a87dabc2a0797722537bbed329576a53
Merge: 3fd5f07 279d80c
Author: allo <allo at laxu.de>
Date:   Sun Nov 7 15:53:46 2010 +0100

    Merge branch 'master' into v1.0

-----------------------------------------------------------------------

Summary of changes:
 examples/example.py                  |    1 -
 examples/tcpServer.py                |    3 +-
 otfbot/lib/color.py                  |   25 ++++---
 otfbot/lib/pyniall_sqlite.py         |   87 ++++++++++++++--------
 otfbot/lib/urlutils.py               |    4 +-
 otfbot/lib/user.py                   |   46 +++++++------
 otfbot/plugins/ircClient/feed.py     |   13 ++--
 otfbot/plugins/ircClient/ki.py       |   18 +++--
 otfbot/plugins/ircClient/log.py      |   94 ++++++++++++++++++-------
 otfbot/plugins/ircClient/svn-push.py |  133 ----------------------------------
 otfbot/plugins/ircClient/timediff.py |    1 -
 otfbot/plugins/tcpServer/__init__.py |    1 -
 otfbot/plugins/tcpServer/svn-push.py |  120 ------------------------------
 otfbot/services/tcpServer.py         |  133 ----------------------------------
 rundoctest.py                        |    2 +-
 twisted/plugins/genconfig_plugin.py  |    5 +-
 twisted/plugins/otfbot_plugin.py     |    3 +
 17 files changed, 194 insertions(+), 495 deletions(-)
 delete mode 100644 otfbot/plugins/ircClient/svn-push.py
 delete mode 100644 otfbot/plugins/tcpServer/__init__.py
 delete mode 100644 otfbot/plugins/tcpServer/svn-push.py
 delete mode 100644 otfbot/services/tcpServer.py


hooks/post-receive
-- 
OTFBot



Mehr Informationen über die Mailingliste Otfbot-dev