77 if button == self.buttonBox.button(QDialogButtonBox.Close): |
77 if button == self.buttonBox.button(QDialogButtonBox.Close): |
78 self.close() |
78 self.close() |
79 elif button == self.buttonBox.button(QDialogButtonBox.Cancel): |
79 elif button == self.buttonBox.button(QDialogButtonBox.Cancel): |
80 self.vcs.getClient().cancel() |
80 self.vcs.getClient().cancel() |
81 |
81 |
82 # TODO: workingDir is obsolete |
82 def startProcess(self, args, showArgs=True, environment=None, client=None): |
83 def startProcess(self, args, workingDir=None, showArgs=True, |
|
84 environment=None): |
|
85 """ |
83 """ |
86 Public slot used to start the process. |
84 Public slot used to start the process. |
87 |
85 |
88 @param args list of arguments for the process (list of strings) |
86 @param args list of arguments for the process |
89 @param workingDir working directory for the process (string) |
87 @type list of str |
90 @param showArgs flag indicating to show the arguments (boolean) |
88 @param showArgs flag indicating to show the arguments |
|
89 @type bool |
91 @param environment dictionary of environment settings to add |
90 @param environment dictionary of environment settings to add |
92 or change for the git process (dict of string and string) |
91 or change for the git process |
|
92 @type dict |
|
93 @param client reference to a non-standard command client |
|
94 @type HgClient |
93 @return flag indicating a successful start of the process |
95 @return flag indicating a successful start of the process |
|
96 @rtype bool |
94 """ |
97 """ |
95 self.errorGroup.hide() |
98 self.errorGroup.hide() |
96 self.inputGroup.hide() |
99 self.inputGroup.hide() |
97 self.normal = False |
100 self.normal = False |
98 |
101 |
110 |
113 |
111 if showArgs: |
114 if showArgs: |
112 self.resultbox.append(' '.join(args)) |
115 self.resultbox.append(' '.join(args)) |
113 self.resultbox.append('') |
116 self.resultbox.append('') |
114 |
117 |
115 out, err = self.vcs.getClient().runcommand( |
118 if client is None: |
|
119 client = self.vcs.getClient() |
|
120 out, err = client.runcommand( |
116 args, |
121 args, |
117 prompt=self.__getInput, |
122 prompt=self.__getInput, |
118 output=self.__showOutput, |
123 output=self.__showOutput, |
119 error=self.__showError |
124 error=self.__showError |
120 ) |
125 ) |