10 |
10 |
11 import os |
11 import os |
12 |
12 |
13 from PyQt4.QtCore import QObject, QThread, QMutex, QProcess, \ |
13 from PyQt4.QtCore import QObject, QThread, QMutex, QProcess, \ |
14 Qt, pyqtSignal |
14 Qt, pyqtSignal |
15 from PyQt4.QtGui import QApplication, QMessageBox |
15 from PyQt4.QtGui import QApplication |
|
16 |
|
17 from E5Gui import E5MessageBox |
16 |
18 |
17 import Preferences |
19 import Preferences |
18 |
20 |
19 class VersionControl(QObject): |
21 class VersionControl(QObject): |
20 """ |
22 """ |
32 vcsStatusMonitorStatus = pyqtSignal(str, str) |
34 vcsStatusMonitorStatus = pyqtSignal(str, str) |
33 |
35 |
34 canBeCommitted = 1 # Indicates that a file/directory is in the vcs. |
36 canBeCommitted = 1 # Indicates that a file/directory is in the vcs. |
35 canBeAdded = 2 # Indicates that a file/directory is not in vcs. |
37 canBeAdded = 2 # Indicates that a file/directory is not in vcs. |
36 |
38 |
37 def __init__(self, parent=None, name=None): |
39 def __init__(self, parent = None, name = None): |
38 """ |
40 """ |
39 Constructor |
41 Constructor |
40 |
42 |
41 @param parent parent widget (QWidget) |
43 @param parent parent widget (QWidget) |
42 @param name name of this object (string) |
44 @param name name of this object (string) |
526 if workingDir: |
528 if workingDir: |
527 proc.setWorkingDirectory(workingDir) |
529 proc.setWorkingDirectory(workingDir) |
528 proc.start(program, arguments) |
530 proc.start(program, arguments) |
529 procStarted = proc.waitForStarted() |
531 procStarted = proc.waitForStarted() |
530 if not procStarted: |
532 if not procStarted: |
531 QMessageBox.critical(None, |
533 E5MessageBox.critical(None, |
532 self.trUtf8('Process Generation Error'), |
534 self.trUtf8('Process Generation Error'), |
533 self.trUtf8( |
535 self.trUtf8( |
534 'The process {0} could not be started. ' |
536 'The process {0} could not be started. ' |
535 'Ensure, that it is in the search path.' |
537 'Ensure, that it is in the search path.' |
536 ).format(program)) |
538 ).format(program)) |