Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # VCAnnounce Bazaar Script
- # Copyright (C) 2009 by Braden Walters
- #
- # This program 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, version 3 of the License.
- #
- # This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
- import socket
- import struct
- from bzrlib import branch
- import config
- def Post_Change_Branch_Tip (result):
- #Connect to VCAnnounce plugin
- #sock = socket.socket()
- #sock.connect ((config.botserver_host, config.botserver_port))
- vars (result.branch.repository.get_revision (new_revno))
- revision_number = struct.pack ('i', result.branch.repository.get_revision(new_revno))
- project_size = struct.pack ('i', len (result.branch.repository.get_revision(new_revid)))
- project = result.branch
- author_size = struct.pack ('i', len (result.branch.repository.get_revision(new_revid).authors))
- author = result.branch.get_revision(new_revid).authors
- commit_message_size = struct.pack ('i', len (result.branch.respository.get_revision(new_revid).message))
- commit_message = result.branch.respository.get_revision(new_revid).message
- #sock.send (revision_number)
- #sock.send (project_size)
- #sock.send (project)
- #sock.send (author_size)
- #sock.send (author)
- #sock.send (commit_message_size)
- #sock.send (commit_message)
- branch.Branch.hooks.install_named_hook ('post_change_branch_tip', Post_Change_Branch_Tip, 'Announce Commit')
- Post_Change_Branch_Tip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement