5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.Plugins.VcsPlugins.vcsMercurial.HgClient</h1> |
9 <h1>eric7.Plugins.VcsPlugins.vcsMercurial.HgClient</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing an interface to the Mercurial command server. |
11 Module implementing an interface to the Mercurial command server. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#HgClient">HgClient</a></td> |
22 <td><a href="#HgClient">HgClient</a></td> |
25 <td>Class implementing the Mercurial command server interface.</td> |
23 <td>Class implementing the Mercurial command server interface.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
|
30 <table> |
28 <table> |
31 <tr><td>None</td></tr> |
29 <tr><td>None</td></tr> |
32 </table> |
30 </table> |
|
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="HgClient" ID="HgClient"></a> |
34 <a NAME="HgClient" ID="HgClient"></a> |
36 <h2>HgClient</h2> |
35 <h2>HgClient</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing the Mercurial command server interface. |
37 Class implementing the Mercurial command server interface. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 QObject |
41 QObject |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
43 <table> |
45 <table> |
44 <tr><td>Channels</td></tr> |
46 <tr><td>Channels</td></tr><tr><td>InputFormat</td></tr><tr><td>OutputFormat</td></tr><tr><td>OutputFormatSize</td></tr><tr><td>ReturnFormat</td></tr> |
45 <tr><td>InputFormat</td></tr> |
47 </table> |
46 <tr><td>OutputFormat</td></tr> |
|
47 <tr><td>OutputFormatSize</td></tr> |
|
48 <tr><td>ReturnFormat</td></tr> |
|
49 </table> |
|
50 |
48 <h3>Class Methods</h3> |
51 <h3>Class Methods</h3> |
49 |
|
50 <table> |
52 <table> |
51 <tr><td>None</td></tr> |
53 <tr><td>None</td></tr> |
52 </table> |
54 </table> |
|
55 |
53 <h3>Methods</h3> |
56 <h3>Methods</h3> |
54 |
57 <table> |
55 <table> |
|
56 |
|
57 <tr> |
58 <tr> |
58 <td><a href="#HgClient.__init__">HgClient</a></td> |
59 <td><a href="#HgClient.__init__">HgClient</a></td> |
59 <td>Constructor</td> |
60 <td>Constructor</td> |
60 </tr> |
61 </tr> |
61 <tr> |
62 <tr> |
121 <tr> |
122 <tr> |
122 <td><a href="#HgClient.wasCanceled">wasCanceled</a></td> |
123 <td><a href="#HgClient.wasCanceled">wasCanceled</a></td> |
123 <td>Public method to check, if the last command was canceled.</td> |
124 <td>Public method to check, if the last command was canceled.</td> |
124 </tr> |
125 </tr> |
125 </table> |
126 </table> |
|
127 |
126 <h3>Static Methods</h3> |
128 <h3>Static Methods</h3> |
127 |
|
128 <table> |
129 <table> |
129 <tr><td>None</td></tr> |
130 <tr><td>None</td></tr> |
130 </table> |
131 </table> |
|
132 |
131 |
133 |
132 <a NAME="HgClient.__init__" ID="HgClient.__init__"></a> |
134 <a NAME="HgClient.__init__" ID="HgClient.__init__"></a> |
133 <h4>HgClient (Constructor)</h4> |
135 <h4>HgClient (Constructor)</h4> |
134 <b>HgClient</b>(<i>repoPath, encoding, vcs, parent=None</i>) |
136 <b>HgClient</b>(<i>repoPath, encoding, vcs, parent=None</i>) |
135 |
|
136 <p> |
137 <p> |
137 Constructor |
138 Constructor |
138 </p> |
139 </p> |
|
140 |
139 <dl> |
141 <dl> |
140 |
142 |
141 <dt><i>repoPath</i> (str)</dt> |
143 <dt><i>repoPath</i> (str)</dt> |
142 <dd> |
144 <dd> |
143 root directory of the repository |
145 root directory of the repository |
156 </dd> |
158 </dd> |
157 </dl> |
159 </dl> |
158 <a NAME="HgClient.__prompt" ID="HgClient.__prompt"></a> |
160 <a NAME="HgClient.__prompt" ID="HgClient.__prompt"></a> |
159 <h4>HgClient.__prompt</h4> |
161 <h4>HgClient.__prompt</h4> |
160 <b>__prompt</b>(<i>size, message</i>) |
162 <b>__prompt</b>(<i>size, message</i>) |
161 |
|
162 <p> |
163 <p> |
163 Private method to prompt the user for some input. |
164 Private method to prompt the user for some input. |
164 </p> |
165 </p> |
|
166 |
165 <dl> |
167 <dl> |
166 |
168 |
167 <dt><i>size</i> (int)</dt> |
169 <dt><i>size</i> (int)</dt> |
168 <dd> |
170 <dd> |
169 maximum length of the requested input |
171 maximum length of the requested input |
187 </dd> |
189 </dd> |
188 </dl> |
190 </dl> |
189 <a NAME="HgClient.__readChannel" ID="HgClient.__readChannel"></a> |
191 <a NAME="HgClient.__readChannel" ID="HgClient.__readChannel"></a> |
190 <h4>HgClient.__readChannel</h4> |
192 <h4>HgClient.__readChannel</h4> |
191 <b>__readChannel</b>(<i></i>) |
193 <b>__readChannel</b>(<i></i>) |
192 |
|
193 <p> |
194 <p> |
194 Private method to read data from the command server. |
195 Private method to read data from the command server. |
195 </p> |
196 </p> |
|
197 |
196 <dl> |
198 <dl> |
197 <dt>Return:</dt> |
199 <dt>Return:</dt> |
198 <dd> |
200 <dd> |
199 tuple of channel designator and channel data |
201 tuple of channel designator and channel data |
200 </dd> |
202 </dd> |
206 </dd> |
208 </dd> |
207 </dl> |
209 </dl> |
208 <a NAME="HgClient.__readHello" ID="HgClient.__readHello"></a> |
210 <a NAME="HgClient.__readHello" ID="HgClient.__readHello"></a> |
209 <h4>HgClient.__readHello</h4> |
211 <h4>HgClient.__readHello</h4> |
210 <b>__readHello</b>(<i></i>) |
212 <b>__readHello</b>(<i></i>) |
211 |
|
212 <p> |
213 <p> |
213 Private method to read the hello message sent by the command server. |
214 Private method to read the hello message sent by the command server. |
214 </p> |
215 </p> |
|
216 |
215 <dl> |
217 <dl> |
216 <dt>Return:</dt> |
218 <dt>Return:</dt> |
217 <dd> |
219 <dd> |
218 tuple of flag indicating success and an error message in case |
220 tuple of flag indicating success and an error message in case |
219 of failure |
221 of failure |
226 </dd> |
228 </dd> |
227 </dl> |
229 </dl> |
228 <a NAME="HgClient.__runcommand" ID="HgClient.__runcommand"></a> |
230 <a NAME="HgClient.__runcommand" ID="HgClient.__runcommand"></a> |
229 <h4>HgClient.__runcommand</h4> |
231 <h4>HgClient.__runcommand</h4> |
230 <b>__runcommand</b>(<i>args, inputChannels, outputChannels</i>) |
232 <b>__runcommand</b>(<i>args, inputChannels, outputChannels</i>) |
231 |
|
232 <p> |
233 <p> |
233 Private method to run a command in the server (low level). |
234 Private method to run a command in the server (low level). |
234 </p> |
235 </p> |
|
236 |
235 <dl> |
237 <dl> |
236 |
238 |
237 <dt><i>args</i> (list of str)</dt> |
239 <dt><i>args</i> (list of str)</dt> |
238 <dd> |
240 <dd> |
239 list of arguments for the command |
241 list of arguments for the command |
273 </dd> |
275 </dd> |
274 </dl> |
276 </dl> |
275 <a NAME="HgClient.__serverFinished" ID="HgClient.__serverFinished"></a> |
277 <a NAME="HgClient.__serverFinished" ID="HgClient.__serverFinished"></a> |
276 <h4>HgClient.__serverFinished</h4> |
278 <h4>HgClient.__serverFinished</h4> |
277 <b>__serverFinished</b>(<i>exitCode, exitStatus</i>) |
279 <b>__serverFinished</b>(<i>exitCode, exitStatus</i>) |
278 |
|
279 <p> |
280 <p> |
280 Private slot connected to the finished signal. |
281 Private slot connected to the finished signal. |
281 </p> |
282 </p> |
|
283 |
282 <dl> |
284 <dl> |
283 |
285 |
284 <dt><i>exitCode</i> (int)</dt> |
286 <dt><i>exitCode</i> (int)</dt> |
285 <dd> |
287 <dd> |
286 exit code of the process |
288 exit code of the process |
291 </dd> |
293 </dd> |
292 </dl> |
294 </dl> |
293 <a NAME="HgClient.__writeDataBlock" ID="HgClient.__writeDataBlock"></a> |
295 <a NAME="HgClient.__writeDataBlock" ID="HgClient.__writeDataBlock"></a> |
294 <h4>HgClient.__writeDataBlock</h4> |
296 <h4>HgClient.__writeDataBlock</h4> |
295 <b>__writeDataBlock</b>(<i>data</i>) |
297 <b>__writeDataBlock</b>(<i>data</i>) |
296 |
|
297 <p> |
298 <p> |
298 Private slot to write some data to the command server. |
299 Private slot to write some data to the command server. |
299 </p> |
300 </p> |
|
301 |
300 <dl> |
302 <dl> |
301 |
303 |
302 <dt><i>data</i> (str)</dt> |
304 <dt><i>data</i> (str)</dt> |
303 <dd> |
305 <dd> |
304 data to be sent |
306 data to be sent |
305 </dd> |
307 </dd> |
306 </dl> |
308 </dl> |
307 <a NAME="HgClient.cancel" ID="HgClient.cancel"></a> |
309 <a NAME="HgClient.cancel" ID="HgClient.cancel"></a> |
308 <h4>HgClient.cancel</h4> |
310 <h4>HgClient.cancel</h4> |
309 <b>cancel</b>(<i></i>) |
311 <b>cancel</b>(<i></i>) |
310 |
|
311 <p> |
312 <p> |
312 Public method to cancel the running command. |
313 Public method to cancel the running command. |
313 </p> |
314 </p> |
|
315 |
314 <a NAME="HgClient.func" ID="HgClient.func"></a> |
316 <a NAME="HgClient.func" ID="HgClient.func"></a> |
315 <h4>HgClient.func</h4> |
317 <h4>HgClient.func</h4> |
316 <b>func</b>(<i></i>) |
318 <b>func</b>(<i></i>) |
317 |
319 |
318 <a NAME="HgClient.getRepository" ID="HgClient.getRepository"></a> |
320 <a NAME="HgClient.getRepository" ID="HgClient.getRepository"></a> |
319 <h4>HgClient.getRepository</h4> |
321 <h4>HgClient.getRepository</h4> |
320 <b>getRepository</b>(<i></i>) |
322 <b>getRepository</b>(<i></i>) |
321 |
|
322 <p> |
323 <p> |
323 Public method to get the repository path this client is serving. |
324 Public method to get the repository path this client is serving. |
324 </p> |
325 </p> |
|
326 |
325 <dl> |
327 <dl> |
326 <dt>Return:</dt> |
328 <dt>Return:</dt> |
327 <dd> |
329 <dd> |
328 repository path |
330 repository path |
329 </dd> |
331 </dd> |
335 </dd> |
337 </dd> |
336 </dl> |
338 </dl> |
337 <a NAME="HgClient.isExecuting" ID="HgClient.isExecuting"></a> |
339 <a NAME="HgClient.isExecuting" ID="HgClient.isExecuting"></a> |
338 <h4>HgClient.isExecuting</h4> |
340 <h4>HgClient.isExecuting</h4> |
339 <b>isExecuting</b>(<i></i>) |
341 <b>isExecuting</b>(<i></i>) |
340 |
|
341 <p> |
342 <p> |
342 Public method to check, if the server is executing a command. |
343 Public method to check, if the server is executing a command. |
343 </p> |
344 </p> |
|
345 |
344 <dl> |
346 <dl> |
345 <dt>Return:</dt> |
347 <dt>Return:</dt> |
346 <dd> |
348 <dd> |
347 flag indicating the execution of a command |
349 flag indicating the execution of a command |
348 </dd> |
350 </dd> |
358 <b>myprompt</b>(<i></i>) |
360 <b>myprompt</b>(<i></i>) |
359 |
361 |
360 <a NAME="HgClient.restartServer" ID="HgClient.restartServer"></a> |
362 <a NAME="HgClient.restartServer" ID="HgClient.restartServer"></a> |
361 <h4>HgClient.restartServer</h4> |
363 <h4>HgClient.restartServer</h4> |
362 <b>restartServer</b>(<i></i>) |
364 <b>restartServer</b>(<i></i>) |
363 |
|
364 <p> |
365 <p> |
365 Public method to restart the command server. |
366 Public method to restart the command server. |
366 </p> |
367 </p> |
|
368 |
367 <dl> |
369 <dl> |
368 <dt>Return:</dt> |
370 <dt>Return:</dt> |
369 <dd> |
371 <dd> |
370 tuple of flag indicating a successful start and an error |
372 tuple of flag indicating a successful start and an error |
371 message in case of failure |
373 message in case of failure |
378 </dd> |
380 </dd> |
379 </dl> |
381 </dl> |
380 <a NAME="HgClient.runcommand" ID="HgClient.runcommand"></a> |
382 <a NAME="HgClient.runcommand" ID="HgClient.runcommand"></a> |
381 <h4>HgClient.runcommand</h4> |
383 <h4>HgClient.runcommand</h4> |
382 <b>runcommand</b>(<i>args, prompt=None, inputData=None, output=None, error=None</i>) |
384 <b>runcommand</b>(<i>args, prompt=None, inputData=None, output=None, error=None</i>) |
383 |
|
384 <p> |
385 <p> |
385 Public method to execute a command via the command server. |
386 Public method to execute a command via the command server. |
386 </p> |
387 </p> |
|
388 |
387 <dl> |
389 <dl> |
388 |
390 |
389 <dt><i>args</i> (list of str)</dt> |
391 <dt><i>args</i> (list of str)</dt> |
390 <dd> |
392 <dd> |
391 list of arguments for the command |
393 list of arguments for the command |
430 </dd> |
432 </dd> |
431 </dl> |
433 </dl> |
432 <a NAME="HgClient.startServer" ID="HgClient.startServer"></a> |
434 <a NAME="HgClient.startServer" ID="HgClient.startServer"></a> |
433 <h4>HgClient.startServer</h4> |
435 <h4>HgClient.startServer</h4> |
434 <b>startServer</b>(<i></i>) |
436 <b>startServer</b>(<i></i>) |
435 |
|
436 <p> |
437 <p> |
437 Public method to start the command server. |
438 Public method to start the command server. |
438 </p> |
439 </p> |
|
440 |
439 <dl> |
441 <dl> |
440 <dt>Return:</dt> |
442 <dt>Return:</dt> |
441 <dd> |
443 <dd> |
442 tuple of flag indicating a successful start and an error |
444 tuple of flag indicating a successful start and an error |
443 message in case of failure |
445 message in case of failure |
450 </dd> |
452 </dd> |
451 </dl> |
453 </dl> |
452 <a NAME="HgClient.stopServer" ID="HgClient.stopServer"></a> |
454 <a NAME="HgClient.stopServer" ID="HgClient.stopServer"></a> |
453 <h4>HgClient.stopServer</h4> |
455 <h4>HgClient.stopServer</h4> |
454 <b>stopServer</b>(<i></i>) |
456 <b>stopServer</b>(<i></i>) |
455 |
|
456 <p> |
457 <p> |
457 Public method to stop the command server. |
458 Public method to stop the command server. |
458 </p> |
459 </p> |
|
460 |
459 <a NAME="HgClient.wasCanceled" ID="HgClient.wasCanceled"></a> |
461 <a NAME="HgClient.wasCanceled" ID="HgClient.wasCanceled"></a> |
460 <h4>HgClient.wasCanceled</h4> |
462 <h4>HgClient.wasCanceled</h4> |
461 <b>wasCanceled</b>(<i></i>) |
463 <b>wasCanceled</b>(<i></i>) |
462 |
|
463 <p> |
464 <p> |
464 Public method to check, if the last command was canceled. |
465 Public method to check, if the last command was canceled. |
465 </p> |
466 </p> |
|
467 |
466 <dl> |
468 <dl> |
467 <dt>Return:</dt> |
469 <dt>Return:</dt> |
468 <dd> |
470 <dd> |
469 flag indicating the cancel state |
471 flag indicating the cancel state |
470 </dd> |
472 </dd> |