/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 branchview/treemodel.py

  • Committer: Jelmer Vernooij
  • Date: 2008-06-29 19:04:44 UTC
  • mto: This revision was merged to the branch mainline in revision 515.
  • Revision ID: jelmer@samba.org-20080629190444-3hhmoc5fsoknrvet
Re-enable signature showing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
import pango
13
13
import re
14
14
from xml.sax.saxutils import escape
 
15
from bzrlib.revision import NULL_REVISION
15
16
 
16
17
from time import (strftime, localtime)
17
18
 
43
44
            self.tags = self.branch.tags.get_reverse_tag_dict()
44
45
        else:
45
46
            self.tags = {}
46
 
    
 
47
 
 
48
    def add_tag(self, tag, revid):
 
49
        self.branch.tags.set_tag(tag, revid)
 
50
        try:
 
51
            self.tags[revid].append(tag)
 
52
        except KeyError:
 
53
            self.tags[revid] = [tag]
 
54
 
47
55
    def on_get_flags(self):
48
56
        return gtk.TREE_MODEL_LIST_ONLY
49
57
    
90
98
            return []
91
99
        if column == REVNO: return ".".join(["%d" % (revno)
92
100
                                      for revno in revno_sequence])
93
 
        
 
101
 
94
102
        if column == TAGS: return self.tags.get(revid, [])
95
103
 
96
 
        if revid is None:
 
104
        if not revid or revid == NULL_REVISION:
97
105
            return None
98
106
        if revid not in self.revisions:
99
107
            revision = self.repository.get_revisions([revid])[0]