|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.queues</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.queues</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the queues extension interface. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#Queues">Queues</a></td> |
|
25 <td>Class implementing the queues extension interface.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="Queues" ID="Queues"></a> |
|
36 <h2>Queues</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the queues extension interface. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 HgExtension |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>APPLIED_LIST</td></tr><tr><td>GOTO</td></tr><tr><td>POP</td></tr><tr><td>PUSH</td></tr><tr><td>QUEUE_ACTIVATE</td></tr><tr><td>QUEUE_DELETE</td></tr><tr><td>QUEUE_PURGE</td></tr><tr><td>SERIES_LIST</td></tr><tr><td>UNAPPLIED_LIST</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#Queues.__init__">Queues</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#Queues.__getCommitMessage">__getCommitMessage</a></td> |
|
63 <td>Private method to get the commit message of the current patch.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#Queues.__getCurrentPatch">__getCurrentPatch</a></td> |
|
67 <td>Private method to get the name of the current patch.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#Queues.__getPatchesList">__getPatchesList</a></td> |
|
71 <td>Private method to get a list of patches of a given type.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#Queues.getGuardsList">getGuardsList</a></td> |
|
75 <td>Public method to get a list of all guards defined.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#Queues.hgQueueCreateRenameQueue">hgQueueCreateRenameQueue</a></td> |
|
79 <td>Public method to create a new queue or rename the active queue.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#Queues.hgQueueDeletePatch">hgQueueDeletePatch</a></td> |
|
83 <td>Public method to delete a selected unapplied patch.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#Queues.hgQueueDeletePurgeActivateQueue">hgQueueDeletePurgeActivateQueue</a></td> |
|
87 <td>Public method to delete the reference to a queue and optionally remove the patch directory or set the active queue.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#Queues.hgQueueFinishAppliedPatches">hgQueueFinishAppliedPatches</a></td> |
|
91 <td>Public method to finish all applied patches.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#Queues.hgQueueFoldUnappliedPatches">hgQueueFoldUnappliedPatches</a></td> |
|
95 <td>Public method to fold patches into the current patch.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#Queues.hgQueueGuardsDeactivate">hgQueueGuardsDeactivate</a></td> |
|
99 <td>Public method to deactivate all active guards.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#Queues.hgQueueGuardsDefine">hgQueueGuardsDefine</a></td> |
|
103 <td>Public method to define guards for the current or a named patch.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#Queues.hgQueueGuardsDropAll">hgQueueGuardsDropAll</a></td> |
|
107 <td>Public method to drop all guards of the current or a named patch.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#Queues.hgQueueGuardsIdentifyActive">hgQueueGuardsIdentifyActive</a></td> |
|
111 <td>Public method to list all active guards.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#Queues.hgQueueGuardsList">hgQueueGuardsList</a></td> |
|
115 <td>Public method to list the guards for the current or a named patch.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#Queues.hgQueueGuardsListAll">hgQueueGuardsListAll</a></td> |
|
119 <td>Public method to list all guards of all patches.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#Queues.hgQueueGuardsSetActive">hgQueueGuardsSetActive</a></td> |
|
123 <td>Public method to set the active guards.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#Queues.hgQueueInit">hgQueueInit</a></td> |
|
127 <td>Public method to initialize a new queue repository.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#Queues.hgQueueListPatches">hgQueueListPatches</a></td> |
|
131 <td>Public method to show a list of all patches.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#Queues.hgQueueListQueues">hgQueueListQueues</a></td> |
|
135 <td>Public method to list available queues.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#Queues.hgQueueNewPatch">hgQueueNewPatch</a></td> |
|
139 <td>Public method to create a new named patch.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#Queues.hgQueuePushPopPatches">hgQueuePushPopPatches</a></td> |
|
143 <td>Public method to push patches onto the stack or pop patches off the stack.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#Queues.hgQueueRefreshPatch">hgQueueRefreshPatch</a></td> |
|
147 <td>Public method to refresh the current patch.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#Queues.hgQueueRenamePatch">hgQueueRenamePatch</a></td> |
|
151 <td>Public method to rename the current or a selected patch.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#Queues.hgQueueShowHeader">hgQueueShowHeader</a></td> |
|
155 <td>Public method to show the commit message of the current patch.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#Queues.hgQueueShowPatch">hgQueueShowPatch</a></td> |
|
159 <td>Public method to show the contents of the current patch.</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#Queues.hgQueueStatus">hgQueueStatus</a></td> |
|
163 <td>Public method used to view the status of a queue repository.</td> |
|
164 </tr> |
|
165 <tr> |
|
166 <td><a href="#Queues.shutdown">shutdown</a></td> |
|
167 <td>Public method used to shutdown the queues interface.</td> |
|
168 </tr> |
|
169 </table> |
|
170 <h3>Static Methods</h3> |
|
171 |
|
172 <table> |
|
173 <tr><td>None</td></tr> |
|
174 </table> |
|
175 |
|
176 <a NAME="Queues.__init__" ID="Queues.__init__"></a> |
|
177 <h4>Queues (Constructor)</h4> |
|
178 <b>Queues</b>(<i>vcs</i>) |
|
179 |
|
180 <p> |
|
181 Constructor |
|
182 </p> |
|
183 <dl> |
|
184 |
|
185 <dt><i>vcs</i></dt> |
|
186 <dd> |
|
187 reference to the Mercurial vcs object |
|
188 </dd> |
|
189 </dl> |
|
190 <a NAME="Queues.__getCommitMessage" ID="Queues.__getCommitMessage"></a> |
|
191 <h4>Queues.__getCommitMessage</h4> |
|
192 <b>__getCommitMessage</b>(<i></i>) |
|
193 |
|
194 <p> |
|
195 Private method to get the commit message of the current patch. |
|
196 </p> |
|
197 <dl> |
|
198 <dt>Return:</dt> |
|
199 <dd> |
|
200 name of the current patch (string) |
|
201 </dd> |
|
202 </dl> |
|
203 <a NAME="Queues.__getCurrentPatch" ID="Queues.__getCurrentPatch"></a> |
|
204 <h4>Queues.__getCurrentPatch</h4> |
|
205 <b>__getCurrentPatch</b>(<i></i>) |
|
206 |
|
207 <p> |
|
208 Private method to get the name of the current patch. |
|
209 </p> |
|
210 <dl> |
|
211 <dt>Return:</dt> |
|
212 <dd> |
|
213 name of the current patch (string) |
|
214 </dd> |
|
215 </dl> |
|
216 <a NAME="Queues.__getPatchesList" ID="Queues.__getPatchesList"></a> |
|
217 <h4>Queues.__getPatchesList</h4> |
|
218 <b>__getPatchesList</b>(<i>listType, withSummary=False</i>) |
|
219 |
|
220 <p> |
|
221 Private method to get a list of patches of a given type. |
|
222 </p> |
|
223 <dl> |
|
224 |
|
225 <dt><i>listType</i></dt> |
|
226 <dd> |
|
227 type of patches list to get |
|
228 (Queues.APPLIED_LIST, Queues.UNAPPLIED_LIST, Queues.SERIES_LIST) |
|
229 </dd> |
|
230 <dt><i>withSummary</i></dt> |
|
231 <dd> |
|
232 flag indicating to get a summary as well (boolean) |
|
233 </dd> |
|
234 </dl> |
|
235 <dl> |
|
236 <dt>Return:</dt> |
|
237 <dd> |
|
238 list of patches (list of string) |
|
239 </dd> |
|
240 </dl> |
|
241 <dl> |
|
242 |
|
243 <dt>Raises <b>ValueError</b>:</dt> |
|
244 <dd> |
|
245 raised to indicate an invalid patch list type |
|
246 </dd> |
|
247 </dl> |
|
248 <a NAME="Queues.getGuardsList" ID="Queues.getGuardsList"></a> |
|
249 <h4>Queues.getGuardsList</h4> |
|
250 <b>getGuardsList</b>(<i>allGuards=True</i>) |
|
251 |
|
252 <p> |
|
253 Public method to get a list of all guards defined. |
|
254 </p> |
|
255 <dl> |
|
256 |
|
257 <dt><i>allGuards</i></dt> |
|
258 <dd> |
|
259 flag indicating to get all guards (boolean) |
|
260 </dd> |
|
261 </dl> |
|
262 <dl> |
|
263 <dt>Return:</dt> |
|
264 <dd> |
|
265 sorted list of guards (list of strings) |
|
266 </dd> |
|
267 </dl> |
|
268 <a NAME="Queues.hgQueueCreateRenameQueue" ID="Queues.hgQueueCreateRenameQueue"></a> |
|
269 <h4>Queues.hgQueueCreateRenameQueue</h4> |
|
270 <b>hgQueueCreateRenameQueue</b>(<i>isCreate</i>) |
|
271 |
|
272 <p> |
|
273 Public method to create a new queue or rename the active queue. |
|
274 </p> |
|
275 <dl> |
|
276 |
|
277 <dt><i>isCreate</i></dt> |
|
278 <dd> |
|
279 flag indicating to create a new queue (boolean) |
|
280 </dd> |
|
281 </dl> |
|
282 <a NAME="Queues.hgQueueDeletePatch" ID="Queues.hgQueueDeletePatch"></a> |
|
283 <h4>Queues.hgQueueDeletePatch</h4> |
|
284 <b>hgQueueDeletePatch</b>(<i></i>) |
|
285 |
|
286 <p> |
|
287 Public method to delete a selected unapplied patch. |
|
288 </p> |
|
289 <a NAME="Queues.hgQueueDeletePurgeActivateQueue" ID="Queues.hgQueueDeletePurgeActivateQueue"></a> |
|
290 <h4>Queues.hgQueueDeletePurgeActivateQueue</h4> |
|
291 <b>hgQueueDeletePurgeActivateQueue</b>(<i>operation</i>) |
|
292 |
|
293 <p> |
|
294 Public method to delete the reference to a queue and optionally |
|
295 remove the patch directory or set the active queue. |
|
296 </p> |
|
297 <dl> |
|
298 |
|
299 <dt><i>operation</i></dt> |
|
300 <dd> |
|
301 operation to be performed (Queues.QUEUE_DELETE, |
|
302 Queues.QUEUE_PURGE, Queues.QUEUE_ACTIVATE) |
|
303 </dd> |
|
304 </dl> |
|
305 <dl> |
|
306 |
|
307 <dt>Raises <b>ValueError</b>:</dt> |
|
308 <dd> |
|
309 raised to indicate an invalid operation |
|
310 </dd> |
|
311 </dl> |
|
312 <a NAME="Queues.hgQueueFinishAppliedPatches" ID="Queues.hgQueueFinishAppliedPatches"></a> |
|
313 <h4>Queues.hgQueueFinishAppliedPatches</h4> |
|
314 <b>hgQueueFinishAppliedPatches</b>(<i></i>) |
|
315 |
|
316 <p> |
|
317 Public method to finish all applied patches. |
|
318 </p> |
|
319 <a NAME="Queues.hgQueueFoldUnappliedPatches" ID="Queues.hgQueueFoldUnappliedPatches"></a> |
|
320 <h4>Queues.hgQueueFoldUnappliedPatches</h4> |
|
321 <b>hgQueueFoldUnappliedPatches</b>(<i></i>) |
|
322 |
|
323 <p> |
|
324 Public method to fold patches into the current patch. |
|
325 </p> |
|
326 <a NAME="Queues.hgQueueGuardsDeactivate" ID="Queues.hgQueueGuardsDeactivate"></a> |
|
327 <h4>Queues.hgQueueGuardsDeactivate</h4> |
|
328 <b>hgQueueGuardsDeactivate</b>(<i></i>) |
|
329 |
|
330 <p> |
|
331 Public method to deactivate all active guards. |
|
332 </p> |
|
333 <a NAME="Queues.hgQueueGuardsDefine" ID="Queues.hgQueueGuardsDefine"></a> |
|
334 <h4>Queues.hgQueueGuardsDefine</h4> |
|
335 <b>hgQueueGuardsDefine</b>(<i></i>) |
|
336 |
|
337 <p> |
|
338 Public method to define guards for the current or a named patch. |
|
339 </p> |
|
340 <a NAME="Queues.hgQueueGuardsDropAll" ID="Queues.hgQueueGuardsDropAll"></a> |
|
341 <h4>Queues.hgQueueGuardsDropAll</h4> |
|
342 <b>hgQueueGuardsDropAll</b>(<i></i>) |
|
343 |
|
344 <p> |
|
345 Public method to drop all guards of the current or a named patch. |
|
346 </p> |
|
347 <a NAME="Queues.hgQueueGuardsIdentifyActive" ID="Queues.hgQueueGuardsIdentifyActive"></a> |
|
348 <h4>Queues.hgQueueGuardsIdentifyActive</h4> |
|
349 <b>hgQueueGuardsIdentifyActive</b>(<i></i>) |
|
350 |
|
351 <p> |
|
352 Public method to list all active guards. |
|
353 </p> |
|
354 <a NAME="Queues.hgQueueGuardsList" ID="Queues.hgQueueGuardsList"></a> |
|
355 <h4>Queues.hgQueueGuardsList</h4> |
|
356 <b>hgQueueGuardsList</b>(<i></i>) |
|
357 |
|
358 <p> |
|
359 Public method to list the guards for the current or a named patch. |
|
360 </p> |
|
361 <a NAME="Queues.hgQueueGuardsListAll" ID="Queues.hgQueueGuardsListAll"></a> |
|
362 <h4>Queues.hgQueueGuardsListAll</h4> |
|
363 <b>hgQueueGuardsListAll</b>(<i></i>) |
|
364 |
|
365 <p> |
|
366 Public method to list all guards of all patches. |
|
367 </p> |
|
368 <a NAME="Queues.hgQueueGuardsSetActive" ID="Queues.hgQueueGuardsSetActive"></a> |
|
369 <h4>Queues.hgQueueGuardsSetActive</h4> |
|
370 <b>hgQueueGuardsSetActive</b>(<i></i>) |
|
371 |
|
372 <p> |
|
373 Public method to set the active guards. |
|
374 </p> |
|
375 <a NAME="Queues.hgQueueInit" ID="Queues.hgQueueInit"></a> |
|
376 <h4>Queues.hgQueueInit</h4> |
|
377 <b>hgQueueInit</b>(<i>name</i>) |
|
378 |
|
379 <p> |
|
380 Public method to initialize a new queue repository. |
|
381 </p> |
|
382 <dl> |
|
383 |
|
384 <dt><i>name</i></dt> |
|
385 <dd> |
|
386 directory name (string) |
|
387 </dd> |
|
388 </dl> |
|
389 <a NAME="Queues.hgQueueListPatches" ID="Queues.hgQueueListPatches"></a> |
|
390 <h4>Queues.hgQueueListPatches</h4> |
|
391 <b>hgQueueListPatches</b>(<i></i>) |
|
392 |
|
393 <p> |
|
394 Public method to show a list of all patches. |
|
395 </p> |
|
396 <a NAME="Queues.hgQueueListQueues" ID="Queues.hgQueueListQueues"></a> |
|
397 <h4>Queues.hgQueueListQueues</h4> |
|
398 <b>hgQueueListQueues</b>(<i></i>) |
|
399 |
|
400 <p> |
|
401 Public method to list available queues. |
|
402 </p> |
|
403 <a NAME="Queues.hgQueueNewPatch" ID="Queues.hgQueueNewPatch"></a> |
|
404 <h4>Queues.hgQueueNewPatch</h4> |
|
405 <b>hgQueueNewPatch</b>(<i></i>) |
|
406 |
|
407 <p> |
|
408 Public method to create a new named patch. |
|
409 </p> |
|
410 <a NAME="Queues.hgQueuePushPopPatches" ID="Queues.hgQueuePushPopPatches"></a> |
|
411 <h4>Queues.hgQueuePushPopPatches</h4> |
|
412 <b>hgQueuePushPopPatches</b>(<i>operation, doAll=False, named=False, force=False</i>) |
|
413 |
|
414 <p> |
|
415 Public method to push patches onto the stack or pop patches off the |
|
416 stack. |
|
417 </p> |
|
418 <dl> |
|
419 |
|
420 <dt><i>operation</i></dt> |
|
421 <dd> |
|
422 operation type to be performed (Queues.POP, |
|
423 Queues.PUSH, Queues.GOTO) |
|
424 </dd> |
|
425 <dt><i>doAll</i></dt> |
|
426 <dd> |
|
427 flag indicating to push/pop all (boolean) |
|
428 </dd> |
|
429 <dt><i>named</i></dt> |
|
430 <dd> |
|
431 flag indicating to push/pop until a named patch |
|
432 is at the top of the stack (boolean) |
|
433 </dd> |
|
434 <dt><i>force</i></dt> |
|
435 <dd> |
|
436 flag indicating a forceful pop (boolean) |
|
437 </dd> |
|
438 </dl> |
|
439 <dl> |
|
440 <dt>Return:</dt> |
|
441 <dd> |
|
442 flag indicating that the project should be reread (boolean) |
|
443 </dd> |
|
444 </dl> |
|
445 <dl> |
|
446 |
|
447 <dt>Raises <b>ValueError</b>:</dt> |
|
448 <dd> |
|
449 raised to indicate an invalid operation |
|
450 </dd> |
|
451 </dl> |
|
452 <a NAME="Queues.hgQueueRefreshPatch" ID="Queues.hgQueueRefreshPatch"></a> |
|
453 <h4>Queues.hgQueueRefreshPatch</h4> |
|
454 <b>hgQueueRefreshPatch</b>(<i>editMessage=False</i>) |
|
455 |
|
456 <p> |
|
457 Public method to refresh the current patch. |
|
458 </p> |
|
459 <dl> |
|
460 |
|
461 <dt><i>editMessage</i></dt> |
|
462 <dd> |
|
463 flag indicating to edit the current |
|
464 commit message (boolean) |
|
465 </dd> |
|
466 </dl> |
|
467 <a NAME="Queues.hgQueueRenamePatch" ID="Queues.hgQueueRenamePatch"></a> |
|
468 <h4>Queues.hgQueueRenamePatch</h4> |
|
469 <b>hgQueueRenamePatch</b>(<i></i>) |
|
470 |
|
471 <p> |
|
472 Public method to rename the current or a selected patch. |
|
473 </p> |
|
474 <a NAME="Queues.hgQueueShowHeader" ID="Queues.hgQueueShowHeader"></a> |
|
475 <h4>Queues.hgQueueShowHeader</h4> |
|
476 <b>hgQueueShowHeader</b>(<i></i>) |
|
477 |
|
478 <p> |
|
479 Public method to show the commit message of the current patch. |
|
480 </p> |
|
481 <a NAME="Queues.hgQueueShowPatch" ID="Queues.hgQueueShowPatch"></a> |
|
482 <h4>Queues.hgQueueShowPatch</h4> |
|
483 <b>hgQueueShowPatch</b>(<i>name</i>) |
|
484 |
|
485 <p> |
|
486 Public method to show the contents of the current patch. |
|
487 </p> |
|
488 <dl> |
|
489 |
|
490 <dt><i>name</i></dt> |
|
491 <dd> |
|
492 file/directory name (string) |
|
493 </dd> |
|
494 </dl> |
|
495 <a NAME="Queues.hgQueueStatus" ID="Queues.hgQueueStatus"></a> |
|
496 <h4>Queues.hgQueueStatus</h4> |
|
497 <b>hgQueueStatus</b>(<i>name</i>) |
|
498 |
|
499 <p> |
|
500 Public method used to view the status of a queue repository. |
|
501 </p> |
|
502 <dl> |
|
503 |
|
504 <dt><i>name</i></dt> |
|
505 <dd> |
|
506 directory name (string) |
|
507 </dd> |
|
508 </dl> |
|
509 <a NAME="Queues.shutdown" ID="Queues.shutdown"></a> |
|
510 <h4>Queues.shutdown</h4> |
|
511 <b>shutdown</b>(<i></i>) |
|
512 |
|
513 <p> |
|
514 Public method used to shutdown the queues interface. |
|
515 </p> |
|
516 <div align="right"><a href="#top">Up</a></div> |
|
517 <hr /> |
|
518 </body></html> |