~ubuntu-branches/ubuntu/precise/gozerbot/precise

« back to all changes in this revision

Viewing changes to gozerplugs/plugs/upgrade.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2008-06-02 19:26:39 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080602192639-3rn65nx4q1sgd6sy
Tags: 0.8.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
#
4
4
 
5
 
""" upgrade command .. determine on svn/mercurial update's output if plugs can
6
 
    be reloaded or that the bot has to be rebooted
7
 
"""
8
 
 
9
5
__copyright__ = 'this file is in the public domain'
10
6
 
11
7
from gozerbot.fleet import fleet
33
29
    if not startrev:
34
30
        ievent.reply("can't fetch current revision")
35
31
        return
 
32
    ievent.reply('upgrading from revision %s' % str(startrev))
36
33
    url = None
37
34
    if ievent.rest:
38
35
        if not ievent.rest.startswith('http://'):
67
64
    else:
68
65
        not silent and ievent.reply(' .. '.join(res))
69
66
    rev = gethgrev()
70
 
    ievent.reply('revision is %s' % rev)
 
67
    ievent.reply("new revision is %s" % rev)
71
68
    args = ['hg', 'diff', '-r%s' % startrev]
72
69
    try:
73
70
        proces = gozerpopen(args)