77
77
""" Display the Push dialog. """
79
self.dialog.error_dialog('Directory is not a branch',
80
'You can perform this action only in a branch.')
79
self.dialog.error_dialog(_('Directory is not a branch'),
80
_('You can perform this action only in a branch.'))
119
119
revs = commit.push(self.comm.get_path(),
120
120
overwrite=self.check_overwrite.get_active())
121
121
except errors.NotBranchError:
122
self.dialog.error_dialog('Directory is not a branch',
123
'You can perform this action only in a branch.')
122
self.dialog.error_dialog(_('Directory is not a branch'),
123
_('You can perform this action only in a branch.'))
125
125
except errors.NoLocationKnown:
126
self.dialog.error_dialog('Push location is unknown',
127
'Please specify a location manually.')
126
self.dialog.error_dialog(_('Push location is unknown'),
127
_('Please specify a location manually.'))
129
129
except errors.NonExistingParent, errmsg:
130
self.dialog.error_dialog("Non existing parent directory",
131
"The parent directory (%s)\ndoesn't exist." % errmsg)
130
self.dialog.error_dialog(_('Non existing parent directory'),
131
_("The parent directory (%s)\ndoesn't exist.") % errmsg)
133
133
except errors.DivergedBranchesError:
134
self.dialog.error_dialog('Branches have been diverged',
135
'You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.')
134
self.dialog.error_dialog(_('Branches have been diverged'),
135
_('You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.'))
139
139
elif radio_specific.get_active():
140
140
location = self.entry_location.get_text()
141
141
if location == '':
142
self.dialog.error_dialog('No location specified',
143
'Please specify a location or use the default.')
142
self.dialog.error_dialog(_('No location specified'),
143
_('Please specify a location or use the default.'))
149
149
self.check_overwrite.get_active(),
150
150
self.check_create.get_active())
151
151
except errors.NotBranchError:
152
self.dialog.error_dialog('Directory is not a branch',
153
'You can perform this action only in a branch.')
152
self.dialog.error_dialog(_('Directory is not a branch'),
153
_('You can perform this action only in a branch.'))
154
154
self.comm.set_busy(self.window, False)
156
156
except errors.NonExistingParent, errmsg:
157
self.dialog.error_dialog("Non existing parent directory",
158
"The parent directory (%s)\ndoesn't exist." % errmsg)
157
self.dialog.error_dialog(_('Non existing parent directory'),
158
_("The parent directory (%s)\ndoesn't exist.") % errmsg)
159
159
self.comm.set_busy(self.window, False)
161
161
except errors.DivergedBranchesError:
162
self.dialog.error_dialog('Branches have been diverged',
163
'You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.')
162
self.dialog.error_dialog(_('Branches have been diverged'),
163
_('You cannot push if branches have diverged. Use the\noverwrite option if you want to push anyway.'))
164
164
self.comm.set_busy(self.window, False)
166
166
except errors.PathPrefixNotCreated:
167
self.dialog.error_dialog("Path prefix not created",
168
"The path leading up to the specified location couldn't\nbe created.")
167
self.dialog.error_dialog(_('Path prefix not created'),
168
_("The path leading up to the specified location couldn't\nbe created."))
169
169
self.comm.set_busy(self.window, False)
178
self.dialog.info_dialog('Push successful',
179
'%d revision(s) pushed.' % revs)
178
self.dialog.info_dialog(_('Push successful'),
179
_('%d revision(s) pushed.') % revs)
181
181
def close(self, widget=None):
182
182
self.window.destroy()