Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py

changeset 537
72b32daeb8d6
parent 500
c3abc7895a01
child 539
87f9bce38a44
equal deleted inserted replaced
536:6d8d39753c82 537:72b32daeb8d6
11 11
12 from PyQt4.QtCore import * 12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import * 13 from PyQt4.QtGui import *
14 14
15 from E5Gui.E5Application import e5App 15 from E5Gui.E5Application import e5App
16 from E5Gui import E5MessageBox
16 17
17 from .Ui_SvnDiffDialog import Ui_SvnDiffDialog 18 from .Ui_SvnDiffDialog import Ui_SvnDiffDialog
18 19
19 import Utilities 20 import Utilities
20 import Preferences 21 import Preferences
159 160
160 self.process.start('svn', args) 161 self.process.start('svn', args)
161 procStarted = self.process.waitForStarted() 162 procStarted = self.process.waitForStarted()
162 if not procStarted: 163 if not procStarted:
163 self.inputGroup.setEnabled(False) 164 self.inputGroup.setEnabled(False)
164 QMessageBox.critical(None, 165 E5MessageBox.critical(self,
165 self.trUtf8('Process Generation Error'), 166 self.trUtf8('Process Generation Error'),
166 self.trUtf8( 167 self.trUtf8(
167 'The process {0} could not be started. ' 168 'The process {0} could not be started. '
168 'Ensure, that it is in the search path.' 169 'Ensure, that it is in the search path.'
169 ).format('svn')) 170 ).format('svn'))
304 try: 305 try:
305 f = open(fname, "w", encoding = "utf-8") 306 f = open(fname, "w", encoding = "utf-8")
306 f.write(self.contents.toPlainText()) 307 f.write(self.contents.toPlainText())
307 f.close() 308 f.close()
308 except IOError as why: 309 except IOError as why:
309 QMessageBox.critical(self, self.trUtf8('Save Diff'), 310 E5MessageBox.critical(self, self.trUtf8('Save Diff'),
310 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' 311 self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.'
311 '<br>Reason: {1}</p>') 312 '<br>Reason: {1}</p>')
312 .format(fname, str(why))) 313 .format(fname, str(why)))
313 314
314 def on_passwordCheckBox_toggled(self, isOn): 315 def on_passwordCheckBox_toggled(self, isOn):

eric ide

mercurial