/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to revisionmenu.py

Allow bzr-gtk and Bazaar versions to be out of sync. No longer warn about 
newer versions of Bazaar, on the assumption the API is sufficiently stable now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
import bzrlib
25
25
import gtk
26
 
import gobject
27
26
from bzrlib import (errors, ui)
28
27
from bzrlib.revision import NULL_REVISION
29
28
 
30
29
class RevisionPopupMenu(gtk.Menu):
31
 
 
32
 
    __gsignals__ = {
33
 
            'tag-added': (
34
 
                gobject.SIGNAL_RUN_FIRST,
35
 
                gobject.TYPE_NONE,
36
 
                (gobject.TYPE_STRING, gobject.TYPE_STRING)
37
 
            )
38
 
    }
39
 
 
40
30
    def __init__(self, repository, revids, branch=None, wt=None):
41
31
        super(RevisionPopupMenu, self).__init__()
42
32
        self.branch = branch
110
100
            dialog.hide()
111
101
        
112
102
            if response == gtk.RESPONSE_OK:
113
 
                self.emit('tag-added', dialog.tagname, dialog._revid)
 
103
                try:
 
104
                    self.branch.lock_write()
 
105
                    self.branch.tags.set_tag(dialog.tagname, dialog._revid)
 
106
                finally:
 
107
                    self.branch.unlock()
114
108
            
115
109
            dialog.destroy()
116
110