/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 olive/handler.py

  • Committer: Jelmer Vernooij
  • Date: 2006-09-06 00:22:31 UTC
  • mto: (0.8.83 merge)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060906002231-c94c6bd9d195713f
Fix a few more bits that I broke earlier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
 
115
115
        try:
116
116
            try:
 
117
                from bzrlib.workingtree import WorkingTree
117
118
                tree_to = WorkingTree.open_containing(self.comm.get_path())[0]
118
119
                branch_to = tree_to.branch
119
 
            except NoWorkingTree:
 
120
            except errors.NoWorkingTree:
120
121
                tree_to = None
121
122
                branch_to = Branch.open_containing(self.comm.get_path())[0]
122
 
            except NoBranchError:
 
123
            except errors.NotBranchError:
123
124
                 self.dialog.error_dialog(_('Directory is not a branch'),
124
125
                                         _('You can perform this action only in a branch.'))
125
126
 
140
141
 
141
142
            old_rh = branch_to.revision_history()
142
143
            if tree_to is not None:
143
 
                tree_to.pull(branch_from, overwrite)
 
144
                tree_to.pull(branch_from)
144
145
            else:
145
 
                branch_to.pull(branch_from, overwrite)
 
146
                branch_to.pull(branch_from)
146
147
            
147
148
            self.dialog.info_dialog(_('Pull successful'),
148
149
                                    _('%d revision(s) pulled.') % ret)
286
287
            m_commit = self.menu.ui.get_widget('/context_right/commit')
287
288
            m_diff = self.menu.ui.get_widget('/context_right/diff')
288
289
            # check if we're in a branch
289
 
            if not is_branch(self.comm.get_path()):
 
290
            try:
 
291
                from bzrlib.branch import Branch
 
292
                Branch.open_containing(self.comm.get_path())
290
293
                m_add.set_sensitive(False)
291
294
                m_remove.set_sensitive(False)
292
295
                m_commit.set_sensitive(False)
293
296
                m_diff.set_sensitive(False)
294
 
            else:
 
297
            except errors.NotBranchError:
295
298
                m_add.set_sensitive(True)
296
299
                m_remove.set_sensitive(True)
297
300
                m_commit.set_sensitive(True)