59
59
def checkout(self, widget):
60
60
from dialog import OliveDialog
61
61
dialog = OliveDialog(self.gladefile)
62
print "DEBUG: dialog imported"
64
63
entry_location = self.glade.get_widget('entry_checkout_location')
65
64
location = entry_location.get_text()
67
66
dialog.error_dialog('You must specify a branch location.')
69
print "DEBUG: got branch location:", location
71
69
destination = self.filechooser.get_filename()
72
print "DEBUG: got destination:", destination
74
71
spinbutton_revno = self.glade.get_widget('spinbutton_checkout_revno')
75
72
revno = spinbutton_revno.get_value_as_int()
78
print "DEBUG: got revision number:", revno
80
76
checkbutton_lightweight = self.glade.get_widget('checkbutton_checkout_lightweight')
81
77
lightweight = checkbutton_lightweight.get_active()
82
print "DEBUG: got lightweight:", lightweight
79
self.comm.set_busy(self.window)
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)
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)
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)