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
19
21
pygtk.require("2.0")
29
from bzrlib import version_info
28
31
import bzrlib.errors as errors
32
from bzrlib.workingtree import WorkingTree
30
34
from dialog import error_dialog
31
35
from olive import gladefile
34
38
""" Display Commit dialog and perform the needed actions. """
35
39
def __init__(self, wt, wtpath):
36
40
""" Initialize the Commit dialog. """
70
74
""" Display the Push dialog. """
72
76
error_dialog(_('Directory is not a branch'),
73
_('You can perform this action only in a branch.'))
77
_('You can perform this action only in a branch.'))
76
80
if self.wt.branch.get_bound_location() is not None:
140
144
specific_files=specific_files)
141
145
except errors.NotBranchError:
142
146
error_dialog(_('Directory is not a branch'),
143
_('You can perform this action only in a branch.'))
147
_('You can perform this action only in a branch.'))
145
149
except errors.LocalRequiresBoundBranch:
146
150
error_dialog(_('Directory is not a checkout'),
147
_('You can perform local commit only on checkouts.'))
151
_('You can perform local commit only on checkouts.'))
149
153
except errors.PointlessCommit:
150
154
error_dialog(_('No changes to commit'),
151
_('Try force commit if you want to commit anyway.'))
155
_('Try force commit if you want to commit anyway.'))
153
157
except errors.ConflictsInTree:
154
158
error_dialog(_('Conflicts in tree'),
155
_('You need to resolve the conflicts before committing.'))
159
_('You need to resolve the conflicts before committing.'))
157
161
except errors.StrictCommitFailed:
158
162
error_dialog(_('Strict commit failed'),
159
_('There are unknown files in the working tree.\nPlease add or delete them.'))
163
_('There are unknown files in the working tree.\nPlease add or delete them.'))
161
165
except errors.BoundBranchOutOfDate, errmsg:
162
166
error_dialog(_('Bound branch is out of date'),
165
169
except errors.BzrError, msg:
166
170
error_dialog(_('Unknown bzr error'), str(msg))