def notify_clients(self, client, repo, revision): command = E.packet(E.command("new_version"), E.repo("%s" % (repo)), E.readable("New revision is %s" % (revision))) message = etree.tostring(command, pretty_print=False) if repo in self.repolist: for registration in self.repolist[repo]: if registration != client: # no point informing the client that told us... registration.send(message)
def notify(repo, rev): s = connect() command = E.packet(E.command("new_version"), E.repo(repo), E.readable("New revision is %s" % (rev))) message = etree.tostring(command, pretty_print=False) s.send(message) s.close()