/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/frontend/gtk/checkout.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-01 16:16:31 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060801161631-ca1ac79e3726e307
Visual feedback when Olive is busy; follow bzr API changes; commit dialog update

2006-08-01  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/frontend/gtk/push.py: now the number of pushed revisions gets
      displayed (Fixed: #54698)
    * olive/backend/info.py: added is_checkout()
    * olive/frontend/gtk/commit.py: local commit checkbox shows up only if the
      current directory is a checkout
    * olive/backend/fileops.py: upgraded to new API (compare_trees deprecated)
    * many files: the cursor changes to a watch when performing time consuming
      operations (Fixed: #54015)

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    def checkout(self, widget):
60
60
        from dialog import OliveDialog
61
61
        dialog = OliveDialog(self.gladefile)
62
 
        print "DEBUG: dialog imported"
63
62
        
64
63
        entry_location = self.glade.get_widget('entry_checkout_location')
65
64
        location = entry_location.get_text()
66
65
        if location is '':
67
66
            dialog.error_dialog('You must specify a branch location.')
68
67
            return
69
 
        print "DEBUG: got branch location:", location
70
68
        
71
69
        destination = self.filechooser.get_filename()
72
 
        print "DEBUG: got destination:", destination
73
70
        
74
71
        spinbutton_revno = self.glade.get_widget('spinbutton_checkout_revno')
75
72
        revno = spinbutton_revno.get_value_as_int()
76
73
        if revno == 0:
77
74
            revno = None
78
 
        print "DEBUG: got revision number:", revno
79
75
        
80
76
        checkbutton_lightweight = self.glade.get_widget('checkbutton_checkout_lightweight')
81
77
        lightweight = checkbutton_lightweight.get_active()
82
 
        print "DEBUG: got lightweight:", lightweight
83
78
        
 
79
        self.comm.set_busy(self.window)
84
80
        try:
85
 
            self.comm.set_statusbar('Checkout in progress, please wait...')
86
 
            print "DEBUG: statusbar set"
87
81
            init.checkout(location, destination, revno, lightweight)
88
 
            print "DEBUG: checkout ended"
89
 
            self.comm.clear_statusbar()
90
 
            print "DEBUG: statusbar cleared"
91
82
        except errors.NotBranchError, errmsg:
92
83
            dialog.error_dialog('Not a branch: %s' % errmsg)
93
 
            self.comm.clear_statusbar()
 
84
            self.comm.set_busy(self.window, False)
94
85
            return
95
86
        except errors.TargetAlreadyExists, errmsg:
96
87
            dialog.error_dialog('Target already exists: %s' % errmsg)
97
 
            self.comm.clear_statusbar()
 
88
            self.comm.set_busy(self.window, False)
98
89
            return
99
90
        except errors.NonExistingParent, errmsg:
100
91
            dialog.error_dialog('Parent directory doesn\'t exist: %s' % errmsg)
101
 
            self.comm.clear_statusbar()
 
92
            self.comm.set_busy(self.window, False)
102
93
            return
103
94
        except:
104
95
            raise