14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
19
pygtk.require("2.0")
32
from bzrlib import version_info
34
28
import bzrlib.errors as errors
35
from bzrlib.workingtree import WorkingTree
37
30
from dialog import error_dialog
31
from olive import gladefile
40
34
""" Display Commit dialog and perform the needed actions. """
41
def __init__(self, gladefile, wt, wtpath):
35
def __init__(self, wt, wtpath):
42
36
""" Initialize the Commit dialog. """
43
self.gladefile = gladefile
44
self.glade = gtk.glade.XML(self.gladefile, 'window_commit', 'olive-gtk')
37
self.glade = gtk.glade.XML(gladefile, 'window_commit', 'olive-gtk')
47
40
self.wtpath = wtpath
77
70
""" Display the Push dialog. """
79
72
error_dialog(_('Directory is not a branch'),
80
_('You can perform this action only in a branch.'))
73
_('You can perform this action only in a branch.'))
83
76
if self.wt.branch.get_bound_location() is not None:
124
117
it = self.file_store.iter_next(it)
127
# end of bzr-gtk code
129
121
def _toggle_commit(self, cell, path, model):
130
122
model[path][0] = not model[path][0]
148
140
specific_files=specific_files)
149
141
except errors.NotBranchError:
150
142
error_dialog(_('Directory is not a branch'),
151
_('You can perform this action only in a branch.'))
143
_('You can perform this action only in a branch.'))
153
145
except errors.LocalRequiresBoundBranch:
154
146
error_dialog(_('Directory is not a checkout'),
155
_('You can perform local commit only on checkouts.'))
147
_('You can perform local commit only on checkouts.'))
157
149
except errors.PointlessCommit:
158
150
error_dialog(_('No changes to commit'),
159
_('Try force commit if you want to commit anyway.'))
151
_('Try force commit if you want to commit anyway.'))
161
153
except errors.ConflictsInTree:
162
154
error_dialog(_('Conflicts in tree'),
163
_('You need to resolve the conflicts before committing.'))
155
_('You need to resolve the conflicts before committing.'))
165
157
except errors.StrictCommitFailed:
166
158
error_dialog(_('Strict commit failed'),
167
_('There are unknown files in the working tree.\nPlease add or delete them.'))
159
_('There are unknown files in the working tree.\nPlease add or delete them.'))
169
161
except errors.BoundBranchOutOfDate, errmsg:
170
162
error_dialog(_('Bound branch is out of date'),
173
165
except errors.BzrError, msg:
174
166
error_dialog(_('Unknown bzr error'), str(msg))