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

  • Committer: Aaron Bentley
  • Date: 2007-08-16 14:31:02 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070816143102-27yzfhdgdv3ggo6e
Fix hue selection to use author in gannotate

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.branch import Branch
29
29
import bzrlib.errors as errors
30
30
 
31
 
from __init__ import gladefile
32
31
from dialog import error_dialog, info_dialog, warning_dialog
 
32
from errors import show_bzr_error
 
33
from olive.guifiles import GLADEFILENAME
 
34
 
33
35
 
34
36
class MergeDialog:
35
37
    """ Display the Merge dialog and perform the needed actions. """
36
38
    def __init__(self, wt, wtpath):
37
39
        """ Initialize the Merge dialog. """
38
 
        self.glade = gtk.glade.XML(gladefile, 'window_merge', 'olive-gtk')
 
40
        self.glade = gtk.glade.XML(GLADEFILENAME, 'window_merge', 'olive-gtk')
39
41
        
40
42
        self.window = self.glade.get_widget('window_merge')
41
43
        
57
59
        """ Display the Add file(s) dialog. """
58
60
        self.window.show_all()
59
61
 
 
62
    @show_bzr_error
60
63
    def merge(self, widget):
61
64
        branch = self.entry.get_text()
62
65
        if branch == "":
64
67
                         _('Please specify a branch to merge from.'))
65
68
            return
66
69
 
67
 
        try:
68
 
            other_branch = Branch.open_containing(branch)[0]
69
 
        except errors.NotBranchError:
70
 
            error_dialog(_('Specified location not a branch'),
71
 
                         _('Please specify a branch you want to merge from.'))
72
 
            return
73
 
        
 
70
        other_branch = Branch.open_containing(branch)[0]
 
71
 
74
72
        try:
75
73
            conflicts = self.wt.merge_from_branch(other_branch)
76
74
        except errors.BzrCommandError, errmsg: