/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/treeview.py

  • Committer: Daniel Schierbeck
  • Date: 2008-01-21 17:23:10 UTC
  • mto: (423.1.8 trunk)
  • mto: This revision was merged to the branch mainline in revision 429.
  • Revision ID: daniel.schierbeck@gmail.com-20080121172310-l4o0m19lc6ghhulh
Moved tag writing logic inside the branchview treemodel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
 
95
95
        self.construct_treeview()
96
96
 
97
 
        self.iter   = None
 
97
        self.iter = None
98
98
        self.branch = branch
 
99
        self.revision = None
99
100
 
100
101
        self.start = start
101
102
        self.maxnum = maxnum
167
168
        :return: list of revision ids.
168
169
        """
169
170
        return self.get_property('parents')
 
171
 
 
172
    def add_tag(self, tag, revid=None):
 
173
        if revid is None: revid = self.revision.revision_id
 
174
 
 
175
        try:
 
176
            self.branch.unlock()
 
177
 
 
178
            try:
 
179
                self.branch.lock_write()
 
180
                self.model.add_tag(tag, revid)
 
181
            finally:
 
182
                self.branch.unlock()
 
183
 
 
184
        finally:
 
185
            self.branch.lock_read()
170
186
        
171
187
    def refresh(self):
172
188
        gobject.idle_add(self.populate, self.get_revision())