|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2011 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the queues extension project helper. |
|
8 """ |
|
9 |
|
10 from __future__ import unicode_literals |
|
11 |
|
12 from PyQt5.QtWidgets import QMenu |
|
13 |
|
14 from E5Gui.E5Action import E5Action |
|
15 from E5Gui import E5MessageBox |
|
16 |
|
17 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
|
18 |
|
19 from .queues import Queues |
|
20 |
|
21 |
|
22 class QueuesProjectHelper(HgExtensionProjectHelper): |
|
23 """ |
|
24 Class implementing the queues extension project helper. |
|
25 """ |
|
26 def __init__(self): |
|
27 """ |
|
28 Constructor |
|
29 """ |
|
30 super(QueuesProjectHelper, self).__init__() |
|
31 |
|
32 def initActions(self): |
|
33 """ |
|
34 Public method to generate the action objects. |
|
35 """ |
|
36 self.hgQueueInitAct = E5Action( |
|
37 self.tr('Init Queue Repository'), |
|
38 self.tr('Init Queue Repository'), |
|
39 0, 0, self, 'mercurial_queues_init') |
|
40 self.hgQueueInitAct.setStatusTip(self.tr( |
|
41 'Initialize a new versioned queue repository' |
|
42 )) |
|
43 self.hgQueueInitAct.setWhatsThis(self.tr( |
|
44 """<b>Init Queue Repository</b>""" |
|
45 """<p>This initializes a new versioned queue repository inside""" |
|
46 """ the current repository.</p>""" |
|
47 )) |
|
48 self.hgQueueInitAct.triggered.connect(self.__hgQueueInit) |
|
49 self.actions.append(self.hgQueueInitAct) |
|
50 |
|
51 self.hgQueueCommitAct = E5Action( |
|
52 self.tr('Commit changes'), |
|
53 self.tr('Commit changes...'), |
|
54 0, 0, self, 'mercurial_queues_commit') |
|
55 self.hgQueueCommitAct.setStatusTip(self.tr( |
|
56 'Commit changes in the queue repository' |
|
57 )) |
|
58 self.hgQueueCommitAct.setWhatsThis(self.tr( |
|
59 """<b>Commit changes...</b>""" |
|
60 """<p>This commits changes in the queue repository.</p>""" |
|
61 )) |
|
62 self.hgQueueCommitAct.triggered.connect(self.__hgQueueCommit) |
|
63 self.actions.append(self.hgQueueCommitAct) |
|
64 |
|
65 self.hgQueueNewAct = E5Action( |
|
66 self.tr('New Patch'), |
|
67 self.tr('New Patch...'), |
|
68 0, 0, self, 'mercurial_queues_new') |
|
69 self.hgQueueNewAct.setStatusTip(self.tr( |
|
70 'Create a new patch' |
|
71 )) |
|
72 self.hgQueueNewAct.setWhatsThis(self.tr( |
|
73 """<b>New Patch</b>""" |
|
74 """<p>This creates a new named patch.</p>""" |
|
75 )) |
|
76 self.hgQueueNewAct.triggered.connect(self.__hgQueueNewPatch) |
|
77 self.actions.append(self.hgQueueNewAct) |
|
78 |
|
79 self.hgQueueRefreshAct = E5Action( |
|
80 self.tr('Update Current Patch'), |
|
81 self.tr('Update Current Patch'), |
|
82 0, 0, self, 'mercurial_queues_refresh') |
|
83 self.hgQueueRefreshAct.setStatusTip(self.tr( |
|
84 'Update the current patch' |
|
85 )) |
|
86 self.hgQueueRefreshAct.setWhatsThis(self.tr( |
|
87 """<b>Update Current Patch</b>""" |
|
88 """<p>This updates the current patch.</p>""" |
|
89 )) |
|
90 self.hgQueueRefreshAct.triggered.connect( |
|
91 self.__hgQueueRefreshPatch) |
|
92 self.actions.append(self.hgQueueRefreshAct) |
|
93 |
|
94 self.hgQueueRefreshMessageAct = E5Action( |
|
95 self.tr('Update Current Patch (with Message)'), |
|
96 self.tr('Update Current Patch (with Message)'), |
|
97 0, 0, self, 'mercurial_queues_refresh_message') |
|
98 self.hgQueueRefreshMessageAct.setStatusTip(self.tr( |
|
99 'Update the current patch and edit commit message' |
|
100 )) |
|
101 self.hgQueueRefreshMessageAct.setWhatsThis(self.tr( |
|
102 """<b>Update Current Patch (with Message)</b>""" |
|
103 """<p>This updates the current patch after giving the chance""" |
|
104 """ to change the current commit message.</p>""" |
|
105 )) |
|
106 self.hgQueueRefreshMessageAct.triggered.connect( |
|
107 self.__hgQueueRefreshPatchMessage) |
|
108 self.actions.append(self.hgQueueRefreshMessageAct) |
|
109 |
|
110 self.hgQueueDiffAct = E5Action( |
|
111 self.tr('Show Current Patch'), |
|
112 self.tr('Show Current Patch...'), |
|
113 0, 0, self, 'mercurial_queues_show') |
|
114 self.hgQueueDiffAct.setStatusTip(self.tr( |
|
115 'Show the contents the current patch' |
|
116 )) |
|
117 self.hgQueueDiffAct.setWhatsThis(self.tr( |
|
118 """<b>Show Current Patch</b>""" |
|
119 """<p>This shows the contents of the current patch including""" |
|
120 """ any changes which have been made in the working directory""" |
|
121 """ since the last refresh.</p>""" |
|
122 )) |
|
123 self.hgQueueDiffAct.triggered.connect(self.__hgQueueShowPatch) |
|
124 self.actions.append(self.hgQueueDiffAct) |
|
125 |
|
126 self.hgQueueHeaderAct = E5Action( |
|
127 self.tr('Show Current Message'), |
|
128 self.tr('Show Current Message...'), |
|
129 0, 0, self, 'mercurial_queues_show_message') |
|
130 self.hgQueueHeaderAct.setStatusTip(self.tr( |
|
131 'Show the commit message of the current patch' |
|
132 )) |
|
133 self.hgQueueHeaderAct.setWhatsThis(self.tr( |
|
134 """<b>Show Current Message</b>""" |
|
135 """<p>This shows the commit message of the current patch.</p>""" |
|
136 )) |
|
137 self.hgQueueHeaderAct.triggered.connect(self.__hgQueueShowHeader) |
|
138 self.actions.append(self.hgQueueHeaderAct) |
|
139 |
|
140 self.hgQueueListAct = E5Action( |
|
141 self.tr('List Patches'), |
|
142 self.tr('List Patches...'), |
|
143 0, 0, self, 'mercurial_queues_list') |
|
144 self.hgQueueListAct.setStatusTip(self.tr( |
|
145 'List applied and unapplied patches' |
|
146 )) |
|
147 self.hgQueueListAct.setWhatsThis(self.tr( |
|
148 """<b>List Patches</b>""" |
|
149 """<p>This lists all applied and unapplied patches.</p>""" |
|
150 )) |
|
151 self.hgQueueListAct.triggered.connect(self.__hgQueueListPatches) |
|
152 self.actions.append(self.hgQueueListAct) |
|
153 |
|
154 self.hgQueueFinishAct = E5Action( |
|
155 self.tr('Finish Applied Patches'), |
|
156 self.tr('Finish Applied Patches'), |
|
157 0, 0, self, 'mercurial_queues_finish_applied') |
|
158 self.hgQueueFinishAct.setStatusTip(self.tr( |
|
159 'Finish applied patches' |
|
160 )) |
|
161 self.hgQueueFinishAct.setWhatsThis(self.tr( |
|
162 """<b>Finish Applied Patches</b>""" |
|
163 """<p>This finishes the applied patches by moving them out of""" |
|
164 """ mq control into regular repository history.</p>""" |
|
165 )) |
|
166 self.hgQueueFinishAct.triggered.connect( |
|
167 self.__hgQueueFinishAppliedPatches) |
|
168 self.actions.append(self.hgQueueFinishAct) |
|
169 |
|
170 self.hgQueueRenameAct = E5Action( |
|
171 self.tr('Rename Patch'), |
|
172 self.tr('Rename Patch'), |
|
173 0, 0, self, 'mercurial_queues_rename') |
|
174 self.hgQueueRenameAct.setStatusTip(self.tr( |
|
175 'Rename a patch' |
|
176 )) |
|
177 self.hgQueueRenameAct.setWhatsThis(self.tr( |
|
178 """<b>Rename Patch</b>""" |
|
179 """<p>This renames the current or a named patch.</p>""" |
|
180 )) |
|
181 self.hgQueueRenameAct.triggered.connect(self.__hgQueueRenamePatch) |
|
182 self.actions.append(self.hgQueueRenameAct) |
|
183 |
|
184 self.hgQueueDeleteAct = E5Action( |
|
185 self.tr('Delete Patch'), |
|
186 self.tr('Delete Patch'), |
|
187 0, 0, self, 'mercurial_queues_delete') |
|
188 self.hgQueueDeleteAct.setStatusTip(self.tr( |
|
189 'Delete unapplied patch' |
|
190 )) |
|
191 self.hgQueueDeleteAct.setWhatsThis(self.tr( |
|
192 """<b>Delete Patch</b>""" |
|
193 """<p>This deletes an unapplied patch.</p>""" |
|
194 )) |
|
195 self.hgQueueDeleteAct.triggered.connect(self.__hgQueueDeletePatch) |
|
196 self.actions.append(self.hgQueueDeleteAct) |
|
197 |
|
198 self.hgQueueFoldAct = E5Action( |
|
199 self.tr('Fold Patches'), |
|
200 self.tr('Fold Patches'), |
|
201 0, 0, self, 'mercurial_queues_fold') |
|
202 self.hgQueueFoldAct.setStatusTip(self.tr( |
|
203 'Fold unapplied patches into the current patch' |
|
204 )) |
|
205 self.hgQueueFoldAct.setWhatsThis(self.tr( |
|
206 """<b>Fold Patches</b>""" |
|
207 """<p>This folds unapplied patches into the current patch.</p>""" |
|
208 )) |
|
209 self.hgQueueFoldAct.triggered.connect( |
|
210 self.__hgQueueFoldUnappliedPatches) |
|
211 self.actions.append(self.hgQueueFoldAct) |
|
212 |
|
213 self.hgQueueStatusAct = E5Action( |
|
214 self.tr('Show Status'), |
|
215 self.tr('Show &Status...'), |
|
216 0, 0, self, 'mercurial_queues_status') |
|
217 self.hgQueueStatusAct.setStatusTip(self.tr( |
|
218 'Show the status of the queue repository' |
|
219 )) |
|
220 self.hgQueueStatusAct.setWhatsThis(self.tr( |
|
221 """<b>Show Status</b>""" |
|
222 """<p>This shows the status of the queue repository.</p>""" |
|
223 )) |
|
224 self.hgQueueStatusAct.triggered.connect(self.__hgQueueStatus) |
|
225 self.actions.append(self.hgQueueStatusAct) |
|
226 |
|
227 self.hgQueueSummaryAct = E5Action( |
|
228 self.tr('Show Summary'), |
|
229 self.tr('Show summary...'), |
|
230 0, 0, self, 'mercurial_queues_summary') |
|
231 self.hgQueueSummaryAct.setStatusTip(self.tr( |
|
232 'Show summary information of the queue repository' |
|
233 )) |
|
234 self.hgQueueSummaryAct.setWhatsThis(self.tr( |
|
235 """<b>Show summary</b>""" |
|
236 """<p>This shows some summary information of the queue""" |
|
237 """ repository.</p>""" |
|
238 )) |
|
239 self.hgQueueSummaryAct.triggered.connect(self.__hgQueueSummary) |
|
240 self.actions.append(self.hgQueueSummaryAct) |
|
241 |
|
242 self.__initPushPopActions() |
|
243 self.__initPushPopForceActions() |
|
244 self.__initGuardsActions() |
|
245 self.__initQueuesMgmtActions() |
|
246 |
|
247 def __initPushPopActions(self): |
|
248 """ |
|
249 Private method to generate the push and pop action objects. |
|
250 """ |
|
251 self.hgQueuePushAct = E5Action( |
|
252 self.tr('Push Next Patch'), |
|
253 self.tr('Push Next Patch'), |
|
254 0, 0, self, 'mercurial_queues_push_next') |
|
255 self.hgQueuePushAct.setStatusTip(self.tr( |
|
256 'Push the next patch onto the stack' |
|
257 )) |
|
258 self.hgQueuePushAct.setWhatsThis(self.tr( |
|
259 """<b>Push Next Patch</b>""" |
|
260 """<p>This pushes the next patch onto the stack of applied""" |
|
261 """ patches.</p>""" |
|
262 )) |
|
263 self.hgQueuePushAct.triggered.connect(self.__hgQueuePushPatch) |
|
264 self.actions.append(self.hgQueuePushAct) |
|
265 |
|
266 self.hgQueuePushAllAct = E5Action( |
|
267 self.tr('Push All Patches'), |
|
268 self.tr('Push All Patches'), |
|
269 0, 0, self, 'mercurial_queues_push_all') |
|
270 self.hgQueuePushAllAct.setStatusTip(self.tr( |
|
271 'Push all patches onto the stack' |
|
272 )) |
|
273 self.hgQueuePushAllAct.setWhatsThis(self.tr( |
|
274 """<b>Push All Patches</b>""" |
|
275 """<p>This pushes all patches onto the stack of applied""" |
|
276 """ patches.</p>""" |
|
277 )) |
|
278 self.hgQueuePushAllAct.triggered.connect( |
|
279 self.__hgQueuePushAllPatches) |
|
280 self.actions.append(self.hgQueuePushAllAct) |
|
281 |
|
282 self.hgQueuePushUntilAct = E5Action( |
|
283 self.tr('Push Patches'), |
|
284 self.tr('Push Patches'), |
|
285 0, 0, self, 'mercurial_queues_push_until') |
|
286 self.hgQueuePushUntilAct.setStatusTip(self.tr( |
|
287 'Push patches onto the stack' |
|
288 )) |
|
289 self.hgQueuePushUntilAct.setWhatsThis(self.tr( |
|
290 """<b>Push Patches</b>""" |
|
291 """<p>This pushes patches onto the stack of applied patches""" |
|
292 """ until a named patch is at the top of the stack.</p>""" |
|
293 )) |
|
294 self.hgQueuePushUntilAct.triggered.connect( |
|
295 self.__hgQueuePushPatches) |
|
296 self.actions.append(self.hgQueuePushUntilAct) |
|
297 |
|
298 self.hgQueuePopAct = E5Action( |
|
299 self.tr('Pop Current Patch'), |
|
300 self.tr('Pop Current Patch'), |
|
301 0, 0, self, 'mercurial_queues_pop_current') |
|
302 self.hgQueuePopAct.setStatusTip(self.tr( |
|
303 'Pop the current patch off the stack' |
|
304 )) |
|
305 self.hgQueuePopAct.setWhatsThis(self.tr( |
|
306 """<b>Pop Current Patch</b>""" |
|
307 """<p>This pops the current patch off the stack of applied""" |
|
308 """ patches.</p>""" |
|
309 )) |
|
310 self.hgQueuePopAct.triggered.connect(self.__hgQueuePopPatch) |
|
311 self.actions.append(self.hgQueuePopAct) |
|
312 |
|
313 self.hgQueuePopAllAct = E5Action( |
|
314 self.tr('Pop All Patches'), |
|
315 self.tr('Pop All Patches'), |
|
316 0, 0, self, 'mercurial_queues_pop_all') |
|
317 self.hgQueuePopAllAct.setStatusTip(self.tr( |
|
318 'Pop all patches off the stack' |
|
319 )) |
|
320 self.hgQueuePopAllAct.setWhatsThis(self.tr( |
|
321 """<b>Pop All Patches</b>""" |
|
322 """<p>This pops all patches off the stack of applied""" |
|
323 """ patches.</p>""" |
|
324 )) |
|
325 self.hgQueuePopAllAct.triggered.connect( |
|
326 self.__hgQueuePopAllPatches) |
|
327 self.actions.append(self.hgQueuePopAllAct) |
|
328 |
|
329 self.hgQueuePopUntilAct = E5Action( |
|
330 self.tr('Pop Patches'), |
|
331 self.tr('Pop Patches'), |
|
332 0, 0, self, 'mercurial_queues_pop_until') |
|
333 self.hgQueuePopUntilAct.setStatusTip(self.tr( |
|
334 'Pop patches off the stack' |
|
335 )) |
|
336 self.hgQueuePopUntilAct.setWhatsThis(self.tr( |
|
337 """<b>Pop Patches</b>""" |
|
338 """<p>This pops patches off the stack of applied patches""" |
|
339 """ until a named patch is at the top of the stack.</p>""" |
|
340 )) |
|
341 self.hgQueuePopUntilAct.triggered.connect(self.__hgQueuePopPatches) |
|
342 self.actions.append(self.hgQueuePopUntilAct) |
|
343 |
|
344 self.hgQueueGotoAct = E5Action( |
|
345 self.tr('Go to Patch'), |
|
346 self.tr('Go to Patch'), |
|
347 0, 0, self, 'mercurial_queues_goto') |
|
348 self.hgQueueGotoAct.setStatusTip(self.tr( |
|
349 'Push or pop patches until named patch is at top of stack' |
|
350 )) |
|
351 self.hgQueueGotoAct.setWhatsThis(self.tr( |
|
352 """<b>Go to Patch</b>""" |
|
353 """<p>This pushes or pops patches until a named patch is at the""" |
|
354 """ top of the stack.</p>""" |
|
355 )) |
|
356 self.hgQueueGotoAct.triggered.connect(self.__hgQueueGotoPatch) |
|
357 self.actions.append(self.hgQueueGotoAct) |
|
358 |
|
359 def __initPushPopForceActions(self): |
|
360 """ |
|
361 Private method to generate the push and pop (force) action objects. |
|
362 """ |
|
363 self.hgQueuePushForceAct = E5Action( |
|
364 self.tr('Push Next Patch'), |
|
365 self.tr('Push Next Patch'), |
|
366 0, 0, self, 'mercurial_queues_push_next_force') |
|
367 self.hgQueuePushForceAct.setStatusTip(self.tr( |
|
368 'Push the next patch onto the stack on top of local changes' |
|
369 )) |
|
370 self.hgQueuePushForceAct.setWhatsThis(self.tr( |
|
371 """<b>Push Next Patch</b>""" |
|
372 """<p>This pushes the next patch onto the stack of applied""" |
|
373 """ patches on top of local changes.</p>""" |
|
374 )) |
|
375 self.hgQueuePushForceAct.triggered.connect( |
|
376 self.__hgQueuePushPatchForced) |
|
377 self.actions.append(self.hgQueuePushForceAct) |
|
378 |
|
379 self.hgQueuePushAllForceAct = E5Action( |
|
380 self.tr('Push All Patches'), |
|
381 self.tr('Push All Patches'), |
|
382 0, 0, self, 'mercurial_queues_push_all_force') |
|
383 self.hgQueuePushAllForceAct.setStatusTip(self.tr( |
|
384 'Push all patches onto the stack on top of local changes' |
|
385 )) |
|
386 self.hgQueuePushAllForceAct.setWhatsThis(self.tr( |
|
387 """<b>Push All Patches</b>""" |
|
388 """<p>This pushes all patches onto the stack of applied patches""" |
|
389 """ on top of local changes.</p>""" |
|
390 )) |
|
391 self.hgQueuePushAllForceAct.triggered.connect( |
|
392 self.__hgQueuePushAllPatchesForced) |
|
393 self.actions.append(self.hgQueuePushAllForceAct) |
|
394 |
|
395 self.hgQueuePushUntilForceAct = E5Action( |
|
396 self.tr('Push Patches'), |
|
397 self.tr('Push Patches'), |
|
398 0, 0, self, 'mercurial_queues_push_until_force') |
|
399 self.hgQueuePushUntilForceAct.setStatusTip(self.tr( |
|
400 'Push patches onto the stack on top of local changes' |
|
401 )) |
|
402 self.hgQueuePushUntilForceAct.setWhatsThis(self.tr( |
|
403 """<b>Push Patches</b>""" |
|
404 """<p>This pushes patches onto the stack of applied patches""" |
|
405 """ until a named patch is at the top of the stack on top of""" |
|
406 """ local changes.</p>""" |
|
407 )) |
|
408 self.hgQueuePushUntilForceAct.triggered.connect( |
|
409 self.__hgQueuePushPatchesForced) |
|
410 self.actions.append(self.hgQueuePushUntilForceAct) |
|
411 |
|
412 self.hgQueuePopForceAct = E5Action( |
|
413 self.tr('Pop Current Patch'), |
|
414 self.tr('Pop Current Patch'), |
|
415 0, 0, self, 'mercurial_queues_pop_current_force') |
|
416 self.hgQueuePopForceAct.setStatusTip(self.tr( |
|
417 'Pop the current patch off the stack forgetting local changes' |
|
418 )) |
|
419 self.hgQueuePopForceAct.setWhatsThis(self.tr( |
|
420 """<b>Pop Current Patch</b>""" |
|
421 """<p>This pops the current patch off the stack of applied""" |
|
422 """ patches""" |
|
423 """ forgetting local changes.</p>""" |
|
424 )) |
|
425 self.hgQueuePopForceAct.triggered.connect( |
|
426 self.__hgQueuePopPatchForced) |
|
427 self.actions.append(self.hgQueuePopForceAct) |
|
428 |
|
429 self.hgQueuePopAllForceAct = E5Action( |
|
430 self.tr('Pop All Patches'), |
|
431 self.tr('Pop All Patches'), |
|
432 0, 0, self, 'mercurial_queues_pop_all_force') |
|
433 self.hgQueuePopAllForceAct.setStatusTip(self.tr( |
|
434 'Pop all patches off the stack forgetting local changes' |
|
435 )) |
|
436 self.hgQueuePopAllForceAct.setWhatsThis(self.tr( |
|
437 """<b>Pop All Patches</b>""" |
|
438 """<p>This pops all patches off the stack of applied patches""" |
|
439 """ forgetting local changes.</p>""" |
|
440 )) |
|
441 self.hgQueuePopAllForceAct.triggered.connect( |
|
442 self.__hgQueuePopAllPatchesForced) |
|
443 self.actions.append(self.hgQueuePopAllForceAct) |
|
444 |
|
445 self.hgQueuePopUntilForceAct = E5Action( |
|
446 self.tr('Pop Patches'), |
|
447 self.tr('Pop Patches'), |
|
448 0, 0, self, 'mercurial_queues_pop_until_force') |
|
449 self.hgQueuePopUntilForceAct.setStatusTip(self.tr( |
|
450 'Pop patches off the stack forgetting local changes' |
|
451 )) |
|
452 self.hgQueuePopUntilForceAct.setWhatsThis(self.tr( |
|
453 """<b>Pop Patches</b>""" |
|
454 """<p>This pops patches off the stack of applied patches until""" |
|
455 """ a named patch is at the top of the stack forgetting local""" |
|
456 """ changes.</p>""" |
|
457 )) |
|
458 self.hgQueuePopUntilForceAct.triggered.connect( |
|
459 self.__hgQueuePopPatchesForced) |
|
460 self.actions.append(self.hgQueuePopUntilForceAct) |
|
461 |
|
462 self.hgQueueGotoForceAct = E5Action( |
|
463 self.tr('Go to Patch'), |
|
464 self.tr('Go to Patch'), |
|
465 0, 0, self, 'mercurial_queues_goto_force') |
|
466 self.hgQueueGotoForceAct.setStatusTip(self.tr( |
|
467 'Push or pop patches until named patch is at top of stack' |
|
468 ' overwriting any local changes' |
|
469 )) |
|
470 self.hgQueueGotoForceAct.setWhatsThis(self.tr( |
|
471 """<b>Go to Patch</b>""" |
|
472 """<p>This pushes or pops patches until a named patch is at the""" |
|
473 """ top of the stack overwriting any local changes.</p>""" |
|
474 )) |
|
475 self.hgQueueGotoForceAct.triggered.connect( |
|
476 self.__hgQueueGotoPatchForced) |
|
477 self.actions.append(self.hgQueueGotoForceAct) |
|
478 |
|
479 def __initGuardsActions(self): |
|
480 """ |
|
481 Private method to generate the guards action objects. |
|
482 """ |
|
483 self.hgQueueDefineGuardsAct = E5Action( |
|
484 self.tr('Define Guards'), |
|
485 self.tr('Define Guards...'), |
|
486 0, 0, self, 'mercurial_queues_guards_define') |
|
487 self.hgQueueDefineGuardsAct.setStatusTip(self.tr( |
|
488 'Define guards for the current or a named patch' |
|
489 )) |
|
490 self.hgQueueDefineGuardsAct.setWhatsThis(self.tr( |
|
491 """<b>Define Guards</b>""" |
|
492 """<p>This opens a dialog to define guards for the current""" |
|
493 """ or a named patch.</p>""" |
|
494 )) |
|
495 self.hgQueueDefineGuardsAct.triggered.connect( |
|
496 self.__hgQueueGuardsDefine) |
|
497 self.actions.append(self.hgQueueDefineGuardsAct) |
|
498 |
|
499 self.hgQueueDropAllGuardsAct = E5Action( |
|
500 self.tr('Drop All Guards'), |
|
501 self.tr('Drop All Guards...'), |
|
502 0, 0, self, 'mercurial_queues_guards_drop_all') |
|
503 self.hgQueueDropAllGuardsAct.setStatusTip(self.tr( |
|
504 'Drop all guards of the current or a named patch' |
|
505 )) |
|
506 self.hgQueueDropAllGuardsAct.setWhatsThis(self.tr( |
|
507 """<b>Drop All Guards</b>""" |
|
508 """<p>This drops all guards of the current or a named patch.</p>""" |
|
509 )) |
|
510 self.hgQueueDropAllGuardsAct.triggered.connect( |
|
511 self.__hgQueueGuardsDropAll) |
|
512 self.actions.append(self.hgQueueDropAllGuardsAct) |
|
513 |
|
514 self.hgQueueListGuardsAct = E5Action( |
|
515 self.tr('List Guards'), |
|
516 self.tr('List Guards...'), |
|
517 0, 0, self, 'mercurial_queues_guards_list') |
|
518 self.hgQueueListGuardsAct.setStatusTip(self.tr( |
|
519 'List guards of the current or a named patch' |
|
520 )) |
|
521 self.hgQueueListGuardsAct.setWhatsThis(self.tr( |
|
522 """<b>List Guards</b>""" |
|
523 """<p>This lists the guards of the current or a named patch.</p>""" |
|
524 )) |
|
525 self.hgQueueListGuardsAct.triggered.connect( |
|
526 self.__hgQueueGuardsList) |
|
527 self.actions.append(self.hgQueueListGuardsAct) |
|
528 |
|
529 self.hgQueueListAllGuardsAct = E5Action( |
|
530 self.tr('List All Guards'), |
|
531 self.tr('List All Guards...'), |
|
532 0, 0, self, 'mercurial_queues_guards_list_all') |
|
533 self.hgQueueListAllGuardsAct.setStatusTip(self.tr( |
|
534 'List all guards of all patches' |
|
535 )) |
|
536 self.hgQueueListAllGuardsAct.setWhatsThis(self.tr( |
|
537 """<b>List All Guards</b>""" |
|
538 """<p>This lists all guards of all patches.</p>""" |
|
539 )) |
|
540 self.hgQueueListAllGuardsAct.triggered.connect( |
|
541 self.__hgQueueGuardsListAll) |
|
542 self.actions.append(self.hgQueueListAllGuardsAct) |
|
543 |
|
544 self.hgQueueActivateGuardsAct = E5Action( |
|
545 self.tr('Set Active Guards'), |
|
546 self.tr('Set Active Guards...'), |
|
547 0, 0, self, 'mercurial_queues_guards_set_active') |
|
548 self.hgQueueActivateGuardsAct.setStatusTip(self.tr( |
|
549 'Set the list of active guards' |
|
550 )) |
|
551 self.hgQueueActivateGuardsAct.setWhatsThis(self.tr( |
|
552 """<b>Set Active Guards</b>""" |
|
553 """<p>This opens a dialog to set the active guards.</p>""" |
|
554 )) |
|
555 self.hgQueueActivateGuardsAct.triggered.connect( |
|
556 self.__hgQueueGuardsSetActive) |
|
557 self.actions.append(self.hgQueueActivateGuardsAct) |
|
558 |
|
559 self.hgQueueDeactivateGuardsAct = E5Action( |
|
560 self.tr('Deactivate Guards'), |
|
561 self.tr('Deactivate Guards...'), |
|
562 0, 0, self, 'mercurial_queues_guards_deactivate') |
|
563 self.hgQueueDeactivateGuardsAct.setStatusTip(self.tr( |
|
564 'Deactivate all active guards' |
|
565 )) |
|
566 self.hgQueueDeactivateGuardsAct.setWhatsThis(self.tr( |
|
567 """<b>Deactivate Guards</b>""" |
|
568 """<p>This deactivates all active guards.</p>""" |
|
569 )) |
|
570 self.hgQueueDeactivateGuardsAct.triggered.connect( |
|
571 self.__hgQueueGuardsDeactivate) |
|
572 self.actions.append(self.hgQueueDeactivateGuardsAct) |
|
573 |
|
574 self.hgQueueIdentifyActiveGuardsAct = E5Action( |
|
575 self.tr('Identify Active Guards'), |
|
576 self.tr('Identify Active Guards...'), |
|
577 0, 0, self, 'mercurial_queues_guards_identify_active') |
|
578 self.hgQueueIdentifyActiveGuardsAct.setStatusTip(self.tr( |
|
579 'Show a list of active guards' |
|
580 )) |
|
581 self.hgQueueIdentifyActiveGuardsAct.setWhatsThis(self.tr( |
|
582 """<b>Identify Active Guards</b>""" |
|
583 """<p>This opens a dialog showing a list of active guards.</p>""" |
|
584 )) |
|
585 self.hgQueueIdentifyActiveGuardsAct.triggered.connect( |
|
586 self.__hgQueueGuardsIdentifyActive) |
|
587 self.actions.append(self.hgQueueIdentifyActiveGuardsAct) |
|
588 |
|
589 def __initQueuesMgmtActions(self): |
|
590 """ |
|
591 Private method to generate the queues management action objects. |
|
592 """ |
|
593 self.hgQueueCreateQueueAct = E5Action( |
|
594 self.tr('Create Queue'), |
|
595 self.tr('Create Queue'), |
|
596 0, 0, self, 'mercurial_queues_create_queue') |
|
597 self.hgQueueCreateQueueAct.setStatusTip(self.tr( |
|
598 'Create a new patch queue' |
|
599 )) |
|
600 self.hgQueueCreateQueueAct.setWhatsThis(self.tr( |
|
601 """<b>Create Queue</b>""" |
|
602 """<p>This creates a new patch queue.</p>""" |
|
603 )) |
|
604 self.hgQueueCreateQueueAct.triggered.connect( |
|
605 self.__hgQueueCreateQueue) |
|
606 self.actions.append(self.hgQueueCreateQueueAct) |
|
607 |
|
608 self.hgQueueRenameQueueAct = E5Action( |
|
609 self.tr('Rename Queue'), |
|
610 self.tr('Rename Queue'), |
|
611 0, 0, self, 'mercurial_queues_rename_queue') |
|
612 self.hgQueueRenameQueueAct.setStatusTip(self.tr( |
|
613 'Rename the active patch queue' |
|
614 )) |
|
615 self.hgQueueRenameQueueAct.setWhatsThis(self.tr( |
|
616 """<b>Rename Queue</b>""" |
|
617 """<p>This renames the active patch queue.</p>""" |
|
618 )) |
|
619 self.hgQueueRenameQueueAct.triggered.connect( |
|
620 self.__hgQueueRenameQueue) |
|
621 self.actions.append(self.hgQueueRenameQueueAct) |
|
622 |
|
623 self.hgQueueDeleteQueueAct = E5Action( |
|
624 self.tr('Delete Queue'), |
|
625 self.tr('Delete Queue'), |
|
626 0, 0, self, 'mercurial_queues_delete_queue') |
|
627 self.hgQueueDeleteQueueAct.setStatusTip(self.tr( |
|
628 'Delete the reference to a patch queue' |
|
629 )) |
|
630 self.hgQueueDeleteQueueAct.setWhatsThis(self.tr( |
|
631 """<b>Delete Queue</b>""" |
|
632 """<p>This deletes the reference to a patch queue.</p>""" |
|
633 )) |
|
634 self.hgQueueDeleteQueueAct.triggered.connect( |
|
635 self.__hgQueueDeleteQueue) |
|
636 self.actions.append(self.hgQueueDeleteQueueAct) |
|
637 |
|
638 self.hgQueuePurgeQueueAct = E5Action( |
|
639 self.tr('Purge Queue'), |
|
640 self.tr('Purge Queue'), |
|
641 0, 0, self, 'mercurial_queues_purge_queue') |
|
642 self.hgQueuePurgeQueueAct.setStatusTip(self.tr( |
|
643 'Delete the reference to a patch queue and remove the patch' |
|
644 ' directory' |
|
645 )) |
|
646 self.hgQueuePurgeQueueAct.setWhatsThis(self.tr( |
|
647 """<b>Purge Queue</b>""" |
|
648 """<p>This deletes the reference to a patch queue and removes""" |
|
649 """ the patch directory.</p>""" |
|
650 )) |
|
651 self.hgQueuePurgeQueueAct.triggered.connect( |
|
652 self.__hgQueuePurgeQueue) |
|
653 self.actions.append(self.hgQueuePurgeQueueAct) |
|
654 |
|
655 self.hgQueueActivateQueueAct = E5Action( |
|
656 self.tr('Activate Queue'), |
|
657 self.tr('Activate Queue'), |
|
658 0, 0, self, 'mercurial_queues_activate_queue') |
|
659 self.hgQueueActivateQueueAct.setStatusTip(self.tr( |
|
660 'Set the active queue' |
|
661 )) |
|
662 self.hgQueueActivateQueueAct.setWhatsThis(self.tr( |
|
663 """<b>Activate Queue</b>""" |
|
664 """<p>This sets the active queue.</p>""" |
|
665 )) |
|
666 self.hgQueueActivateQueueAct.triggered.connect( |
|
667 self.__hgQueueActivateQueue) |
|
668 self.actions.append(self.hgQueueActivateQueueAct) |
|
669 |
|
670 self.hgQueueListQueuesAct = E5Action( |
|
671 self.tr('List Queues'), |
|
672 self.tr('List Queues...'), |
|
673 0, 0, self, 'mercurial_queues_list_queues') |
|
674 self.hgQueueListQueuesAct.setStatusTip(self.tr( |
|
675 'List the available queues' |
|
676 )) |
|
677 self.hgQueueListQueuesAct.setWhatsThis(self.tr( |
|
678 """<b>List Queues</b>""" |
|
679 """<p>This opens a dialog showing all available queues.</p>""" |
|
680 )) |
|
681 self.hgQueueListQueuesAct.triggered.connect( |
|
682 self.__hgQueueListQueues) |
|
683 self.actions.append(self.hgQueueListQueuesAct) |
|
684 |
|
685 def initMenu(self, mainMenu): |
|
686 """ |
|
687 Public method to generate the extension menu. |
|
688 |
|
689 @param mainMenu reference to the main menu (QMenu) |
|
690 @return populated menu (QMenu) |
|
691 """ |
|
692 menu = QMenu(self.menuTitle(), mainMenu) |
|
693 menu.setTearOffEnabled(True) |
|
694 |
|
695 pushPopMenu = QMenu(self.tr("Push/Pop"), menu) |
|
696 pushPopMenu.setTearOffEnabled(True) |
|
697 pushPopMenu.addAction(self.hgQueuePushAct) |
|
698 pushPopMenu.addAction(self.hgQueuePushUntilAct) |
|
699 pushPopMenu.addAction(self.hgQueuePushAllAct) |
|
700 pushPopMenu.addSeparator() |
|
701 pushPopMenu.addAction(self.hgQueuePopAct) |
|
702 pushPopMenu.addAction(self.hgQueuePopUntilAct) |
|
703 pushPopMenu.addAction(self.hgQueuePopAllAct) |
|
704 pushPopMenu.addSeparator() |
|
705 pushPopMenu.addAction(self.hgQueueGotoAct) |
|
706 |
|
707 pushPopForceMenu = QMenu(self.tr("Push/Pop (force)"), menu) |
|
708 pushPopForceMenu.setTearOffEnabled(True) |
|
709 pushPopForceMenu.addAction(self.hgQueuePushForceAct) |
|
710 pushPopForceMenu.addAction(self.hgQueuePushUntilForceAct) |
|
711 pushPopForceMenu.addAction(self.hgQueuePushAllForceAct) |
|
712 pushPopForceMenu.addSeparator() |
|
713 pushPopForceMenu.addAction(self.hgQueuePopForceAct) |
|
714 pushPopForceMenu.addAction(self.hgQueuePopUntilForceAct) |
|
715 pushPopForceMenu.addAction(self.hgQueuePopAllForceAct) |
|
716 pushPopForceMenu.addSeparator() |
|
717 pushPopForceMenu.addAction(self.hgQueueGotoForceAct) |
|
718 |
|
719 guardsMenu = QMenu(self.tr("Guards"), menu) |
|
720 guardsMenu.setTearOffEnabled(True) |
|
721 guardsMenu.addAction(self.hgQueueDefineGuardsAct) |
|
722 guardsMenu.addAction(self.hgQueueDropAllGuardsAct) |
|
723 guardsMenu.addSeparator() |
|
724 guardsMenu.addAction(self.hgQueueListGuardsAct) |
|
725 guardsMenu.addAction(self.hgQueueListAllGuardsAct) |
|
726 guardsMenu.addSeparator() |
|
727 guardsMenu.addAction(self.hgQueueActivateGuardsAct) |
|
728 guardsMenu.addAction(self.hgQueueDeactivateGuardsAct) |
|
729 guardsMenu.addSeparator() |
|
730 guardsMenu.addAction(self.hgQueueIdentifyActiveGuardsAct) |
|
731 |
|
732 queuesMenu = QMenu(self.tr("Queue Management"), menu) |
|
733 queuesMenu.setTearOffEnabled(True) |
|
734 queuesMenu.addAction(self.hgQueueCreateQueueAct) |
|
735 queuesMenu.addAction(self.hgQueueRenameQueueAct) |
|
736 queuesMenu.addAction(self.hgQueueDeleteQueueAct) |
|
737 queuesMenu.addAction(self.hgQueuePurgeQueueAct) |
|
738 queuesMenu.addSeparator() |
|
739 queuesMenu.addAction(self.hgQueueActivateQueueAct) |
|
740 queuesMenu.addSeparator() |
|
741 queuesMenu.addAction(self.hgQueueListQueuesAct) |
|
742 |
|
743 menu.addAction(self.hgQueueInitAct) |
|
744 menu.addAction(self.hgQueueCommitAct) |
|
745 menu.addSeparator() |
|
746 menu.addAction(self.hgQueueNewAct) |
|
747 menu.addAction(self.hgQueueRefreshAct) |
|
748 menu.addAction(self.hgQueueRefreshMessageAct) |
|
749 menu.addAction(self.hgQueueFinishAct) |
|
750 menu.addSeparator() |
|
751 menu.addAction(self.hgQueueStatusAct) |
|
752 menu.addAction(self.hgQueueSummaryAct) |
|
753 menu.addSeparator() |
|
754 menu.addAction(self.hgQueueDiffAct) |
|
755 menu.addAction(self.hgQueueHeaderAct) |
|
756 menu.addSeparator() |
|
757 menu.addAction(self.hgQueueListAct) |
|
758 menu.addSeparator() |
|
759 menu.addMenu(pushPopMenu) |
|
760 menu.addMenu(pushPopForceMenu) |
|
761 menu.addSeparator() |
|
762 menu.addAction(self.hgQueueRenameAct) |
|
763 menu.addAction(self.hgQueueDeleteAct) |
|
764 menu.addSeparator() |
|
765 menu.addAction(self.hgQueueFoldAct) |
|
766 menu.addSeparator() |
|
767 menu.addMenu(guardsMenu) |
|
768 menu.addSeparator() |
|
769 menu.addMenu(queuesMenu) |
|
770 |
|
771 return menu |
|
772 |
|
773 def menuTitle(self): |
|
774 """ |
|
775 Public method to get the menu title. |
|
776 |
|
777 @return title of the menu (string) |
|
778 """ |
|
779 return self.tr("Queues") |
|
780 |
|
781 def __hgQueueNewPatch(self): |
|
782 """ |
|
783 Private slot used to create a new named patch. |
|
784 """ |
|
785 self.vcs.getExtensionObject("mq")\ |
|
786 .hgQueueNewPatch(self.project.getProjectPath()) |
|
787 |
|
788 def __hgQueueRefreshPatch(self): |
|
789 """ |
|
790 Private slot used to refresh the current patch. |
|
791 """ |
|
792 self.vcs.getExtensionObject("mq")\ |
|
793 .hgQueueRefreshPatch(self.project.getProjectPath()) |
|
794 |
|
795 def __hgQueueRefreshPatchMessage(self): |
|
796 """ |
|
797 Private slot used to refresh the current patch and its commit message. |
|
798 """ |
|
799 self.vcs.getExtensionObject("mq")\ |
|
800 .hgQueueRefreshPatch(self.project.getProjectPath(), |
|
801 editMessage=True) |
|
802 |
|
803 def __hgQueueShowPatch(self): |
|
804 """ |
|
805 Private slot used to show the contents of the current patch. |
|
806 """ |
|
807 self.vcs.getExtensionObject("mq")\ |
|
808 .hgQueueShowPatch(self.project.getProjectPath()) |
|
809 |
|
810 def __hgQueueShowHeader(self): |
|
811 """ |
|
812 Private slot used to show the commit message of the current patch. |
|
813 """ |
|
814 self.vcs.getExtensionObject("mq")\ |
|
815 .hgQueueShowHeader(self.project.getProjectPath()) |
|
816 |
|
817 def __hgQueuePushPopPatches(self, name, operation, doAll=False, |
|
818 named=False, force=False): |
|
819 """ |
|
820 Private method to push patches onto the stack or pop patches off the |
|
821 stack. |
|
822 |
|
823 @param name file/directory name (string) |
|
824 @param operation operation type to be performed (Queues.POP, |
|
825 Queues.PUSH, Queues.GOTO) |
|
826 @keyparam doAll flag indicating to push/pop all (boolean) |
|
827 @keyparam named flag indicating to push/pop until a named patch |
|
828 is at the top of the stack (boolean) |
|
829 @keyparam force flag indicating a forceful pop (boolean) |
|
830 """ |
|
831 shouldReopen = self.vcs.getExtensionObject("mq")\ |
|
832 .hgQueuePushPopPatches(name, operation=operation, doAll=doAll, |
|
833 named=named, force=force) |
|
834 if shouldReopen: |
|
835 res = E5MessageBox.yesNo( |
|
836 None, |
|
837 self.tr("Changing Applied Patches"), |
|
838 self.tr("""The project should be reread. Do this now?"""), |
|
839 yesDefault=True) |
|
840 if res: |
|
841 self.project.reopenProject() |
|
842 |
|
843 def __hgQueuePushPatch(self): |
|
844 """ |
|
845 Private slot used to push the next patch onto the stack. |
|
846 """ |
|
847 self.__hgQueuePushPopPatches( |
|
848 self.project.getProjectPath(), |
|
849 operation=Queues.PUSH, doAll=False, named=False) |
|
850 |
|
851 def __hgQueuePushPatchForced(self): |
|
852 """ |
|
853 Private slot used to push the next patch onto the stack on top |
|
854 of local changes. |
|
855 """ |
|
856 self.__hgQueuePushPopPatches( |
|
857 self.project.getProjectPath(), |
|
858 operation=Queues.PUSH, doAll=False, named=False, force=True) |
|
859 |
|
860 def __hgQueuePushAllPatches(self): |
|
861 """ |
|
862 Private slot used to push all patches onto the stack. |
|
863 """ |
|
864 self.__hgQueuePushPopPatches( |
|
865 self.project.getProjectPath(), |
|
866 operation=Queues.PUSH, doAll=True, named=False) |
|
867 |
|
868 def __hgQueuePushAllPatchesForced(self): |
|
869 """ |
|
870 Private slot used to push all patches onto the stack on top |
|
871 of local changes. |
|
872 """ |
|
873 self.__hgQueuePushPopPatches( |
|
874 self.project.getProjectPath(), |
|
875 operation=Queues.PUSH, doAll=True, named=False, force=True) |
|
876 |
|
877 def __hgQueuePushPatches(self): |
|
878 """ |
|
879 Private slot used to push patches onto the stack until a named |
|
880 one is at the top. |
|
881 """ |
|
882 self.__hgQueuePushPopPatches( |
|
883 self.project.getProjectPath(), |
|
884 operation=Queues.PUSH, doAll=False, named=True) |
|
885 |
|
886 def __hgQueuePushPatchesForced(self): |
|
887 """ |
|
888 Private slot used to push patches onto the stack until a named |
|
889 one is at the top on top of local changes. |
|
890 """ |
|
891 self.__hgQueuePushPopPatches( |
|
892 self.project.getProjectPath(), |
|
893 operation=Queues.PUSH, doAll=False, named=True, force=True) |
|
894 |
|
895 def __hgQueuePopPatch(self): |
|
896 """ |
|
897 Private slot used to pop the current patch off the stack. |
|
898 """ |
|
899 self.__hgQueuePushPopPatches( |
|
900 self.project.getProjectPath(), |
|
901 operation=Queues.POP, doAll=False, named=False) |
|
902 |
|
903 def __hgQueuePopPatchForced(self): |
|
904 """ |
|
905 Private slot used to pop the current patch off the stack forgetting |
|
906 any local changes to patched files. |
|
907 """ |
|
908 self.__hgQueuePushPopPatches( |
|
909 self.project.getProjectPath(), |
|
910 operation=Queues.POP, doAll=False, named=False, force=True) |
|
911 |
|
912 def __hgQueuePopAllPatches(self): |
|
913 """ |
|
914 Private slot used to pop all patches off the stack. |
|
915 """ |
|
916 self.__hgQueuePushPopPatches( |
|
917 self.project.getProjectPath(), |
|
918 operation=Queues.POP, doAll=True, named=False) |
|
919 |
|
920 def __hgQueuePopAllPatchesForced(self): |
|
921 """ |
|
922 Private slot used to pop all patches off the stack forgetting |
|
923 any local changes to patched files. |
|
924 """ |
|
925 self.__hgQueuePushPopPatches( |
|
926 self.project.getProjectPath(), |
|
927 operation=Queues.POP, doAll=True, named=False, force=True) |
|
928 |
|
929 def __hgQueuePopPatches(self): |
|
930 """ |
|
931 Private slot used to pop patches off the stack until a named |
|
932 one is at the top. |
|
933 """ |
|
934 self.__hgQueuePushPopPatches( |
|
935 self.project.getProjectPath(), |
|
936 operation=Queues.POP, doAll=False, named=True) |
|
937 |
|
938 def __hgQueuePopPatchesForced(self): |
|
939 """ |
|
940 Private slot used to pop patches off the stack until a named |
|
941 one is at the top forgetting any local changes to patched files. |
|
942 """ |
|
943 self.__hgQueuePushPopPatches( |
|
944 self.project.getProjectPath(), |
|
945 operation=Queues.POP, doAll=False, named=True, force=True) |
|
946 |
|
947 def __hgQueueGotoPatch(self): |
|
948 """ |
|
949 Private slot used to push or pop patches until the a named one |
|
950 is at the top of the stack. |
|
951 """ |
|
952 self.__hgQueuePushPopPatches( |
|
953 self.project.getProjectPath(), |
|
954 operation=Queues.GOTO, doAll=False, named=True) |
|
955 |
|
956 def __hgQueueGotoPatchForced(self): |
|
957 """ |
|
958 Private slot used to push or pop patches until the a named one |
|
959 is at the top of the stack overwriting local changes. |
|
960 """ |
|
961 self.__hgQueuePushPopPatches( |
|
962 self.project.getProjectPath(), |
|
963 operation=Queues.GOTO, doAll=False, named=True, force=True) |
|
964 |
|
965 def __hgQueueListPatches(self): |
|
966 """ |
|
967 Private slot used to show a list of applied and unapplied patches. |
|
968 """ |
|
969 self.vcs.getExtensionObject("mq")\ |
|
970 .hgQueueListPatches(self.project.getProjectPath()) |
|
971 |
|
972 def __hgQueueFinishAppliedPatches(self): |
|
973 """ |
|
974 Private slot used to finish all applied patches. |
|
975 """ |
|
976 self.vcs.getExtensionObject("mq")\ |
|
977 .hgQueueFinishAppliedPatches(self.project.getProjectPath()) |
|
978 |
|
979 def __hgQueueRenamePatch(self): |
|
980 """ |
|
981 Private slot used to rename a patch. |
|
982 """ |
|
983 self.vcs.getExtensionObject("mq")\ |
|
984 .hgQueueRenamePatch(self.project.getProjectPath()) |
|
985 |
|
986 def __hgQueueDeletePatch(self): |
|
987 """ |
|
988 Private slot used to delete a patch. |
|
989 """ |
|
990 self.vcs.getExtensionObject("mq")\ |
|
991 .hgQueueDeletePatch(self.project.getProjectPath()) |
|
992 |
|
993 def __hgQueueFoldUnappliedPatches(self): |
|
994 """ |
|
995 Private slot used to fold patches into the current patch. |
|
996 """ |
|
997 self.vcs.getExtensionObject("mq")\ |
|
998 .hgQueueFoldUnappliedPatches(self.project.getProjectPath()) |
|
999 |
|
1000 def __hgQueueGuardsDefine(self): |
|
1001 """ |
|
1002 Private slot used to define guards for the current or a named patch. |
|
1003 """ |
|
1004 self.vcs.getExtensionObject("mq")\ |
|
1005 .hgQueueGuardsDefine(self.project.getProjectPath()) |
|
1006 |
|
1007 def __hgQueueGuardsDropAll(self): |
|
1008 """ |
|
1009 Private slot used to drop all guards of the current or a named patch. |
|
1010 """ |
|
1011 self.vcs.getExtensionObject("mq")\ |
|
1012 .hgQueueGuardsDropAll(self.project.getProjectPath()) |
|
1013 |
|
1014 def __hgQueueGuardsList(self): |
|
1015 """ |
|
1016 Private slot used to list the guards for the current or a named patch. |
|
1017 """ |
|
1018 self.vcs.getExtensionObject("mq")\ |
|
1019 .hgQueueGuardsList(self.project.getProjectPath()) |
|
1020 |
|
1021 def __hgQueueGuardsListAll(self): |
|
1022 """ |
|
1023 Private slot used to list all guards of all patches. |
|
1024 """ |
|
1025 self.vcs.getExtensionObject("mq")\ |
|
1026 .hgQueueGuardsListAll(self.project.getProjectPath()) |
|
1027 |
|
1028 def __hgQueueGuardsSetActive(self): |
|
1029 """ |
|
1030 Private slot used to set the active guards. |
|
1031 """ |
|
1032 self.vcs.getExtensionObject("mq")\ |
|
1033 .hgQueueGuardsSetActive(self.project.getProjectPath()) |
|
1034 |
|
1035 def __hgQueueGuardsDeactivate(self): |
|
1036 """ |
|
1037 Private slot used to deactivate all active guards. |
|
1038 """ |
|
1039 self.vcs.getExtensionObject("mq")\ |
|
1040 .hgQueueGuardsDeactivate(self.project.getProjectPath()) |
|
1041 |
|
1042 def __hgQueueGuardsIdentifyActive(self): |
|
1043 """ |
|
1044 Private slot used to list all active guards. |
|
1045 """ |
|
1046 self.vcs.getExtensionObject("mq")\ |
|
1047 .hgQueueGuardsIdentifyActive(self.project.getProjectPath()) |
|
1048 |
|
1049 def __hgQueueCreateQueue(self): |
|
1050 """ |
|
1051 Private slot used to create a new queue. |
|
1052 """ |
|
1053 self.vcs.getExtensionObject("mq")\ |
|
1054 .hgQueueCreateRenameQueue(self.project.getProjectPath(), True) |
|
1055 |
|
1056 def __hgQueueRenameQueue(self): |
|
1057 """ |
|
1058 Private slot used to rename the active queue. |
|
1059 """ |
|
1060 self.vcs.getExtensionObject("mq")\ |
|
1061 .hgQueueCreateRenameQueue(self.project.getProjectPath(), False) |
|
1062 |
|
1063 def __hgQueueDeleteQueue(self): |
|
1064 """ |
|
1065 Private slot used to delete the reference to a queue. |
|
1066 """ |
|
1067 self.vcs.getExtensionObject("mq")\ |
|
1068 .hgQueueDeletePurgeActivateQueue(self.project.getProjectPath(), |
|
1069 Queues.QUEUE_DELETE) |
|
1070 |
|
1071 def __hgQueuePurgeQueue(self): |
|
1072 """ |
|
1073 Private slot used to delete the reference to a queue and remove |
|
1074 the patch directory. |
|
1075 """ |
|
1076 self.vcs.getExtensionObject("mq")\ |
|
1077 .hgQueueDeletePurgeActivateQueue(self.project.getProjectPath(), |
|
1078 Queues.QUEUE_PURGE) |
|
1079 |
|
1080 def __hgQueueActivateQueue(self): |
|
1081 """ |
|
1082 Private slot used to set the active queue. |
|
1083 """ |
|
1084 self.vcs.getExtensionObject("mq")\ |
|
1085 .hgQueueDeletePurgeActivateQueue(self.project.getProjectPath(), |
|
1086 Queues.QUEUE_ACTIVATE) |
|
1087 |
|
1088 def __hgQueueListQueues(self): |
|
1089 """ |
|
1090 Private slot used to list available queues. |
|
1091 """ |
|
1092 self.vcs.getExtensionObject("mq")\ |
|
1093 .hgQueueListQueues(self.project.getProjectPath()) |
|
1094 |
|
1095 def __hgQueueInit(self): |
|
1096 """ |
|
1097 Private slot to initialize a new queue repository. |
|
1098 """ |
|
1099 self.vcs.getExtensionObject("mq")\ |
|
1100 .hgQueueInit(self.project.getProjectPath()) |
|
1101 |
|
1102 def __hgQueueCommit(self): |
|
1103 """ |
|
1104 Private slot to commit changes in the queue repository. |
|
1105 """ |
|
1106 self.vcs.vcsCommit(self.project.getProjectPath(), "", mq=True) |
|
1107 |
|
1108 def __hgQueueStatus(self): |
|
1109 """ |
|
1110 Private slot to show the status of the queue repository. |
|
1111 """ |
|
1112 self.vcs.getExtensionObject("mq")\ |
|
1113 .hgQueueStatus(self.project.getProjectPath()) |
|
1114 |
|
1115 def __hgQueueSummary(self): |
|
1116 """ |
|
1117 Private slot to show a summary of the queue repository. |
|
1118 """ |
|
1119 self.vcs.hgSummary(mq=True) |