Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py

changeset 3008
7848489bcb92
parent 2962
d6c9d1ca2da4
child 3020
542e97d4ecb3
child 3057
10516539f238
equal deleted inserted replaced
3007:bad2e89047e7 3008:7848489bcb92
37 self.hgQueueInitAct.setStatusTip(self.trUtf8( 37 self.hgQueueInitAct.setStatusTip(self.trUtf8(
38 'Initialize a new versioned queue repository' 38 'Initialize a new versioned queue repository'
39 )) 39 ))
40 self.hgQueueInitAct.setWhatsThis(self.trUtf8( 40 self.hgQueueInitAct.setWhatsThis(self.trUtf8(
41 """<b>Init Queue Repository</b>""" 41 """<b>Init Queue Repository</b>"""
42 """<p>This initializes a new versioned queue repository inside the""" 42 """<p>This initializes a new versioned queue repository inside"""
43 """ current repository.</p>""" 43 """ the current repository.</p>"""
44 )) 44 ))
45 self.hgQueueInitAct.triggered[()].connect(self.__hgQueueInit) 45 self.hgQueueInitAct.triggered[()].connect(self.__hgQueueInit)
46 self.actions.append(self.hgQueueInitAct) 46 self.actions.append(self.hgQueueInitAct)
47 47
48 self.hgQueueCommitAct = E5Action( 48 self.hgQueueCommitAct = E5Action(
80 )) 80 ))
81 self.hgQueueRefreshAct.setWhatsThis(self.trUtf8( 81 self.hgQueueRefreshAct.setWhatsThis(self.trUtf8(
82 """<b>Update Current Patch</b>""" 82 """<b>Update Current Patch</b>"""
83 """<p>This updates the current patch.</p>""" 83 """<p>This updates the current patch.</p>"""
84 )) 84 ))
85 self.hgQueueRefreshAct.triggered[()].connect(self.__hgQueueRefreshPatch) 85 self.hgQueueRefreshAct.triggered[()].connect(
86 self.__hgQueueRefreshPatch)
86 self.actions.append(self.hgQueueRefreshAct) 87 self.actions.append(self.hgQueueRefreshAct)
87 88
88 self.hgQueueRefreshMessageAct = E5Action( 89 self.hgQueueRefreshMessageAct = E5Action(
89 self.trUtf8('Update Current Patch (with Message)'), 90 self.trUtf8('Update Current Patch (with Message)'),
90 self.trUtf8('Update Current Patch (with Message)'), 91 self.trUtf8('Update Current Patch (with Message)'),
92 self.hgQueueRefreshMessageAct.setStatusTip(self.trUtf8( 93 self.hgQueueRefreshMessageAct.setStatusTip(self.trUtf8(
93 'Update the current patch and edit commit message' 94 'Update the current patch and edit commit message'
94 )) 95 ))
95 self.hgQueueRefreshMessageAct.setWhatsThis(self.trUtf8( 96 self.hgQueueRefreshMessageAct.setWhatsThis(self.trUtf8(
96 """<b>Update Current Patch (with Message)</b>""" 97 """<b>Update Current Patch (with Message)</b>"""
97 """<p>This updates the current patch after giving the chance to change""" 98 """<p>This updates the current patch after giving the chance"""
98 """ the current commit message.</p>""" 99 """ to change the current commit message.</p>"""
99 )) 100 ))
100 self.hgQueueRefreshMessageAct.triggered[()].connect( 101 self.hgQueueRefreshMessageAct.triggered[()].connect(
101 self.__hgQueueRefreshPatchMessage) 102 self.__hgQueueRefreshPatchMessage)
102 self.actions.append(self.hgQueueRefreshMessageAct) 103 self.actions.append(self.hgQueueRefreshMessageAct)
103 104
151 self.hgQueueFinishAct.setWhatsThis(self.trUtf8( 152 self.hgQueueFinishAct.setWhatsThis(self.trUtf8(
152 """<b>Finish Applied Patches</b>""" 153 """<b>Finish Applied Patches</b>"""
153 """<p>This finishes the applied patches by moving them out of""" 154 """<p>This finishes the applied patches by moving them out of"""
154 """ mq control into regular repository history.</p>""" 155 """ mq control into regular repository history.</p>"""
155 )) 156 ))
156 self.hgQueueFinishAct.triggered[()].connect(self.__hgQueueFinishAppliedPatches) 157 self.hgQueueFinishAct.triggered[()].connect(
158 self.__hgQueueFinishAppliedPatches)
157 self.actions.append(self.hgQueueFinishAct) 159 self.actions.append(self.hgQueueFinishAct)
158 160
159 self.hgQueueRenameAct = E5Action(self.trUtf8('Rename Patch'), 161 self.hgQueueRenameAct = E5Action(self.trUtf8('Rename Patch'),
160 self.trUtf8('Rename Patch'), 162 self.trUtf8('Rename Patch'),
161 0, 0, self, 'mercurial_queues_rename') 163 0, 0, self, 'mercurial_queues_rename')
190 )) 192 ))
191 self.hgQueueFoldAct.setWhatsThis(self.trUtf8( 193 self.hgQueueFoldAct.setWhatsThis(self.trUtf8(
192 """<b>Fold Patches</b>""" 194 """<b>Fold Patches</b>"""
193 """<p>This folds unapplied patches into the current patch.</p>""" 195 """<p>This folds unapplied patches into the current patch.</p>"""
194 )) 196 ))
195 self.hgQueueFoldAct.triggered[()].connect(self.__hgQueueFoldUnappliedPatches) 197 self.hgQueueFoldAct.triggered[()].connect(
198 self.__hgQueueFoldUnappliedPatches)
196 self.actions.append(self.hgQueueFoldAct) 199 self.actions.append(self.hgQueueFoldAct)
197 200
198 self.hgQueueStatusAct = E5Action(self.trUtf8('Show Status'), 201 self.hgQueueStatusAct = E5Action(self.trUtf8('Show Status'),
199 self.trUtf8('Show &Status...'), 202 self.trUtf8('Show &Status...'),
200 0, 0, self, 'mercurial_queues_status') 203 0, 0, self, 'mercurial_queues_status')
223 self.hgQueuePushAct.setStatusTip(self.trUtf8( 226 self.hgQueuePushAct.setStatusTip(self.trUtf8(
224 'Push the next patch onto the stack' 227 'Push the next patch onto the stack'
225 )) 228 ))
226 self.hgQueuePushAct.setWhatsThis(self.trUtf8( 229 self.hgQueuePushAct.setWhatsThis(self.trUtf8(
227 """<b>Push Next Patch</b>""" 230 """<b>Push Next Patch</b>"""
228 """<p>This pushes the next patch onto the stack of applied patches.</p>""" 231 """<p>This pushes the next patch onto the stack of applied"""
232 """ patches.</p>"""
229 )) 233 ))
230 self.hgQueuePushAct.triggered[()].connect(self.__hgQueuePushPatch) 234 self.hgQueuePushAct.triggered[()].connect(self.__hgQueuePushPatch)
231 self.actions.append(self.hgQueuePushAct) 235 self.actions.append(self.hgQueuePushAct)
232 236
233 self.hgQueuePushAllAct = E5Action(self.trUtf8('Push All Patches'), 237 self.hgQueuePushAllAct = E5Action(self.trUtf8('Push All Patches'),
236 self.hgQueuePushAllAct.setStatusTip(self.trUtf8( 240 self.hgQueuePushAllAct.setStatusTip(self.trUtf8(
237 'Push all patches onto the stack' 241 'Push all patches onto the stack'
238 )) 242 ))
239 self.hgQueuePushAllAct.setWhatsThis(self.trUtf8( 243 self.hgQueuePushAllAct.setWhatsThis(self.trUtf8(
240 """<b>Push All Patches</b>""" 244 """<b>Push All Patches</b>"""
241 """<p>This pushes all patches onto the stack of applied patches.</p>""" 245 """<p>This pushes all patches onto the stack of applied"""
242 )) 246 """ patches.</p>"""
243 self.hgQueuePushAllAct.triggered[()].connect(self.__hgQueuePushAllPatches) 247 ))
248 self.hgQueuePushAllAct.triggered[()].connect(
249 self.__hgQueuePushAllPatches)
244 self.actions.append(self.hgQueuePushAllAct) 250 self.actions.append(self.hgQueuePushAllAct)
245 251
246 self.hgQueuePushUntilAct = E5Action(self.trUtf8('Push Patches'), 252 self.hgQueuePushUntilAct = E5Action(self.trUtf8('Push Patches'),
247 self.trUtf8('Push Patches'), 253 self.trUtf8('Push Patches'),
248 0, 0, self, 'mercurial_queues_push_until') 254 0, 0, self, 'mercurial_queues_push_until')
249 self.hgQueuePushUntilAct.setStatusTip(self.trUtf8( 255 self.hgQueuePushUntilAct.setStatusTip(self.trUtf8(
250 'Push patches onto the stack' 256 'Push patches onto the stack'
251 )) 257 ))
252 self.hgQueuePushUntilAct.setWhatsThis(self.trUtf8( 258 self.hgQueuePushUntilAct.setWhatsThis(self.trUtf8(
253 """<b>Push Patches</b>""" 259 """<b>Push Patches</b>"""
254 """<p>This pushes patches onto the stack of applied patches until""" 260 """<p>This pushes patches onto the stack of applied patches"""
255 """ a named patch is at the top of the stack.</p>""" 261 """ until a named patch is at the top of the stack.</p>"""
256 )) 262 ))
257 self.hgQueuePushUntilAct.triggered[()].connect(self.__hgQueuePushPatches) 263 self.hgQueuePushUntilAct.triggered[()].connect(
264 self.__hgQueuePushPatches)
258 self.actions.append(self.hgQueuePushUntilAct) 265 self.actions.append(self.hgQueuePushUntilAct)
259 266
260 self.hgQueuePopAct = E5Action(self.trUtf8('Pop Current Patch'), 267 self.hgQueuePopAct = E5Action(self.trUtf8('Pop Current Patch'),
261 self.trUtf8('Pop Current Patch'), 268 self.trUtf8('Pop Current Patch'),
262 0, 0, self, 'mercurial_queues_pop_current') 269 0, 0, self, 'mercurial_queues_pop_current')
263 self.hgQueuePopAct.setStatusTip(self.trUtf8( 270 self.hgQueuePopAct.setStatusTip(self.trUtf8(
264 'Pop the current patch off the stack' 271 'Pop the current patch off the stack'
265 )) 272 ))
266 self.hgQueuePopAct.setWhatsThis(self.trUtf8( 273 self.hgQueuePopAct.setWhatsThis(self.trUtf8(
267 """<b>Pop Current Patch</b>""" 274 """<b>Pop Current Patch</b>"""
268 """<p>This pops the current patch off the stack of applied patches.</p>""" 275 """<p>This pops the current patch off the stack of applied"""
276 """ patches.</p>"""
269 )) 277 ))
270 self.hgQueuePopAct.triggered[()].connect(self.__hgQueuePopPatch) 278 self.hgQueuePopAct.triggered[()].connect(self.__hgQueuePopPatch)
271 self.actions.append(self.hgQueuePopAct) 279 self.actions.append(self.hgQueuePopAct)
272 280
273 self.hgQueuePopAllAct = E5Action(self.trUtf8('Pop All Patches'), 281 self.hgQueuePopAllAct = E5Action(self.trUtf8('Pop All Patches'),
276 self.hgQueuePopAllAct.setStatusTip(self.trUtf8( 284 self.hgQueuePopAllAct.setStatusTip(self.trUtf8(
277 'Pop all patches off the stack' 285 'Pop all patches off the stack'
278 )) 286 ))
279 self.hgQueuePopAllAct.setWhatsThis(self.trUtf8( 287 self.hgQueuePopAllAct.setWhatsThis(self.trUtf8(
280 """<b>Pop All Patches</b>""" 288 """<b>Pop All Patches</b>"""
281 """<p>This pops all patches off the stack of applied patches.</p>""" 289 """<p>This pops all patches off the stack of applied"""
282 )) 290 """ patches.</p>"""
283 self.hgQueuePopAllAct.triggered[()].connect(self.__hgQueuePopAllPatches) 291 ))
292 self.hgQueuePopAllAct.triggered[()].connect(
293 self.__hgQueuePopAllPatches)
284 self.actions.append(self.hgQueuePopAllAct) 294 self.actions.append(self.hgQueuePopAllAct)
285 295
286 self.hgQueuePopUntilAct = E5Action(self.trUtf8('Pop Patches'), 296 self.hgQueuePopUntilAct = E5Action(self.trUtf8('Pop Patches'),
287 self.trUtf8('Pop Patches'), 297 self.trUtf8('Pop Patches'),
288 0, 0, self, 'mercurial_queues_pop_until') 298 0, 0, self, 'mercurial_queues_pop_until')
289 self.hgQueuePopUntilAct.setStatusTip(self.trUtf8( 299 self.hgQueuePopUntilAct.setStatusTip(self.trUtf8(
290 'Pop patches off the stack' 300 'Pop patches off the stack'
291 )) 301 ))
292 self.hgQueuePopUntilAct.setWhatsThis(self.trUtf8( 302 self.hgQueuePopUntilAct.setWhatsThis(self.trUtf8(
293 """<b>Pop Patches</b>""" 303 """<b>Pop Patches</b>"""
294 """<p>This pops patches off the stack of applied patches until a named""" 304 """<p>This pops patches off the stack of applied patches"""
295 """ patch is at the top of the stack.</p>""" 305 """ until a named patch is at the top of the stack.</p>"""
296 )) 306 ))
297 self.hgQueuePopUntilAct.triggered[()].connect(self.__hgQueuePopPatches) 307 self.hgQueuePopUntilAct.triggered[()].connect(self.__hgQueuePopPatches)
298 self.actions.append(self.hgQueuePopUntilAct) 308 self.actions.append(self.hgQueuePopUntilAct)
299 309
300 self.hgQueueGotoAct = E5Action(self.trUtf8('Go to Patch'), 310 self.hgQueueGotoAct = E5Action(self.trUtf8('Go to Patch'),
321 self.hgQueuePushForceAct.setStatusTip(self.trUtf8( 331 self.hgQueuePushForceAct.setStatusTip(self.trUtf8(
322 'Push the next patch onto the stack on top of local changes' 332 'Push the next patch onto the stack on top of local changes'
323 )) 333 ))
324 self.hgQueuePushForceAct.setWhatsThis(self.trUtf8( 334 self.hgQueuePushForceAct.setWhatsThis(self.trUtf8(
325 """<b>Push Next Patch</b>""" 335 """<b>Push Next Patch</b>"""
326 """<p>This pushes the next patch onto the stack of applied patches""" 336 """<p>This pushes the next patch onto the stack of applied"""
327 """ on top of local changes.</p>""" 337 """ patches on top of local changes.</p>"""
328 )) 338 ))
329 self.hgQueuePushForceAct.triggered[()].connect(self.__hgQueuePushPatchForced) 339 self.hgQueuePushForceAct.triggered[()].connect(
340 self.__hgQueuePushPatchForced)
330 self.actions.append(self.hgQueuePushForceAct) 341 self.actions.append(self.hgQueuePushForceAct)
331 342
332 self.hgQueuePushAllForceAct = E5Action(self.trUtf8('Push All Patches'), 343 self.hgQueuePushAllForceAct = E5Action(self.trUtf8('Push All Patches'),
333 self.trUtf8('Push All Patches'), 344 self.trUtf8('Push All Patches'),
334 0, 0, self, 'mercurial_queues_push_all_force') 345 0, 0, self, 'mercurial_queues_push_all_force')
350 self.hgQueuePushUntilForceAct.setStatusTip(self.trUtf8( 361 self.hgQueuePushUntilForceAct.setStatusTip(self.trUtf8(
351 'Push patches onto the stack on top of local changes' 362 'Push patches onto the stack on top of local changes'
352 )) 363 ))
353 self.hgQueuePushUntilForceAct.setWhatsThis(self.trUtf8( 364 self.hgQueuePushUntilForceAct.setWhatsThis(self.trUtf8(
354 """<b>Push Patches</b>""" 365 """<b>Push Patches</b>"""
355 """<p>This pushes patches onto the stack of applied patches until""" 366 """<p>This pushes patches onto the stack of applied patches"""
356 """ a named patch is at the top of the stack on top of local changes.</p>""" 367 """ until a named patch is at the top of the stack on top of"""
368 """ local changes.</p>"""
357 )) 369 ))
358 self.hgQueuePushUntilForceAct.triggered[()].connect( 370 self.hgQueuePushUntilForceAct.triggered[()].connect(
359 self.__hgQueuePushPatchesForced) 371 self.__hgQueuePushPatchesForced)
360 self.actions.append(self.hgQueuePushUntilForceAct) 372 self.actions.append(self.hgQueuePushUntilForceAct)
361 373
365 self.hgQueuePopForceAct.setStatusTip(self.trUtf8( 377 self.hgQueuePopForceAct.setStatusTip(self.trUtf8(
366 'Pop the current patch off the stack forgetting local changes' 378 'Pop the current patch off the stack forgetting local changes'
367 )) 379 ))
368 self.hgQueuePopForceAct.setWhatsThis(self.trUtf8( 380 self.hgQueuePopForceAct.setWhatsThis(self.trUtf8(
369 """<b>Pop Current Patch</b>""" 381 """<b>Pop Current Patch</b>"""
370 """<p>This pops the current patch off the stack of applied patches""" 382 """<p>This pops the current patch off the stack of applied"""
383 """ patches"""
371 """ forgetting local changes.</p>""" 384 """ forgetting local changes.</p>"""
372 )) 385 ))
373 self.hgQueuePopForceAct.triggered[()].connect(self.__hgQueuePopPatchForced) 386 self.hgQueuePopForceAct.triggered[()].connect(
387 self.__hgQueuePopPatchForced)
374 self.actions.append(self.hgQueuePopForceAct) 388 self.actions.append(self.hgQueuePopForceAct)
375 389
376 self.hgQueuePopAllForceAct = E5Action(self.trUtf8('Pop All Patches'), 390 self.hgQueuePopAllForceAct = E5Action(self.trUtf8('Pop All Patches'),
377 self.trUtf8('Pop All Patches'), 391 self.trUtf8('Pop All Patches'),
378 0, 0, self, 'mercurial_queues_pop_all_force') 392 0, 0, self, 'mercurial_queues_pop_all_force')
394 self.hgQueuePopUntilForceAct.setStatusTip(self.trUtf8( 408 self.hgQueuePopUntilForceAct.setStatusTip(self.trUtf8(
395 'Pop patches off the stack forgetting local changes' 409 'Pop patches off the stack forgetting local changes'
396 )) 410 ))
397 self.hgQueuePopUntilForceAct.setWhatsThis(self.trUtf8( 411 self.hgQueuePopUntilForceAct.setWhatsThis(self.trUtf8(
398 """<b>Pop Patches</b>""" 412 """<b>Pop Patches</b>"""
399 """<p>This pops patches off the stack of applied patches until a named""" 413 """<p>This pops patches off the stack of applied patches until"""
400 """ patch is at the top of the stack forgetting local changes.</p>""" 414 """ a named patch is at the top of the stack forgetting local"""
401 )) 415 """ changes.</p>"""
402 self.hgQueuePopUntilForceAct.triggered[()].connect(self.__hgQueuePopPatchesForced) 416 ))
417 self.hgQueuePopUntilForceAct.triggered[()].connect(
418 self.__hgQueuePopPatchesForced)
403 self.actions.append(self.hgQueuePopUntilForceAct) 419 self.actions.append(self.hgQueuePopUntilForceAct)
404 420
405 self.hgQueueGotoForceAct = E5Action(self.trUtf8('Go to Patch'), 421 self.hgQueueGotoForceAct = E5Action(self.trUtf8('Go to Patch'),
406 self.trUtf8('Go to Patch'), 422 self.trUtf8('Go to Patch'),
407 0, 0, self, 'mercurial_queues_goto_force') 423 0, 0, self, 'mercurial_queues_goto_force')
408 self.hgQueueGotoForceAct.setStatusTip(self.trUtf8( 424 self.hgQueueGotoForceAct.setStatusTip(self.trUtf8(
409 'Push or pop patches until named patch is at top of stack overwriting' 425 'Push or pop patches until named patch is at top of stack'
410 ' any local changes' 426 ' overwriting any local changes'
411 )) 427 ))
412 self.hgQueueGotoForceAct.setWhatsThis(self.trUtf8( 428 self.hgQueueGotoForceAct.setWhatsThis(self.trUtf8(
413 """<b>Go to Patch</b>""" 429 """<b>Go to Patch</b>"""
414 """<p>This pushes or pops patches until a named patch is at the""" 430 """<p>This pushes or pops patches until a named patch is at the"""
415 """ top of the stack overwriting any local changes.</p>""" 431 """ top of the stack overwriting any local changes.</p>"""
416 )) 432 ))
417 self.hgQueueGotoForceAct.triggered[()].connect(self.__hgQueueGotoPatchForced) 433 self.hgQueueGotoForceAct.triggered[()].connect(
434 self.__hgQueueGotoPatchForced)
418 self.actions.append(self.hgQueueGotoForceAct) 435 self.actions.append(self.hgQueueGotoForceAct)
419 436
420 def __initGuardsActions(self): 437 def __initGuardsActions(self):
421 """ 438 """
422 Public method to generate the guards action objects. 439 Public method to generate the guards action objects.
430 self.hgQueueDefineGuardsAct.setWhatsThis(self.trUtf8( 447 self.hgQueueDefineGuardsAct.setWhatsThis(self.trUtf8(
431 """<b>Define Guards</b>""" 448 """<b>Define Guards</b>"""
432 """<p>This opens a dialog to define guards for the current""" 449 """<p>This opens a dialog to define guards for the current"""
433 """ or a named patch.</p>""" 450 """ or a named patch.</p>"""
434 )) 451 ))
435 self.hgQueueDefineGuardsAct.triggered[()].connect(self.__hgQueueGuardsDefine) 452 self.hgQueueDefineGuardsAct.triggered[()].connect(
453 self.__hgQueueGuardsDefine)
436 self.actions.append(self.hgQueueDefineGuardsAct) 454 self.actions.append(self.hgQueueDefineGuardsAct)
437 455
438 self.hgQueueDropAllGuardsAct = E5Action(self.trUtf8('Drop All Guards'), 456 self.hgQueueDropAllGuardsAct = E5Action(self.trUtf8('Drop All Guards'),
439 self.trUtf8('Drop All Guards...'), 457 self.trUtf8('Drop All Guards...'),
440 0, 0, self, 'mercurial_queues_guards_drop_all') 458 0, 0, self, 'mercurial_queues_guards_drop_all')
443 )) 461 ))
444 self.hgQueueDropAllGuardsAct.setWhatsThis(self.trUtf8( 462 self.hgQueueDropAllGuardsAct.setWhatsThis(self.trUtf8(
445 """<b>Drop All Guards</b>""" 463 """<b>Drop All Guards</b>"""
446 """<p>This drops all guards of the current or a named patch.</p>""" 464 """<p>This drops all guards of the current or a named patch.</p>"""
447 )) 465 ))
448 self.hgQueueDropAllGuardsAct.triggered[()].connect(self.__hgQueueGuardsDropAll) 466 self.hgQueueDropAllGuardsAct.triggered[()].connect(
467 self.__hgQueueGuardsDropAll)
449 self.actions.append(self.hgQueueDropAllGuardsAct) 468 self.actions.append(self.hgQueueDropAllGuardsAct)
450 469
451 self.hgQueueListGuardsAct = E5Action(self.trUtf8('List Guards'), 470 self.hgQueueListGuardsAct = E5Action(self.trUtf8('List Guards'),
452 self.trUtf8('List Guards...'), 471 self.trUtf8('List Guards...'),
453 0, 0, self, 'mercurial_queues_guards_list') 472 0, 0, self, 'mercurial_queues_guards_list')
456 )) 475 ))
457 self.hgQueueListGuardsAct.setWhatsThis(self.trUtf8( 476 self.hgQueueListGuardsAct.setWhatsThis(self.trUtf8(
458 """<b>List Guards</b>""" 477 """<b>List Guards</b>"""
459 """<p>This lists the guards of the current or a named patch.</p>""" 478 """<p>This lists the guards of the current or a named patch.</p>"""
460 )) 479 ))
461 self.hgQueueListGuardsAct.triggered[()].connect(self.__hgQueueGuardsList) 480 self.hgQueueListGuardsAct.triggered[()].connect(
481 self.__hgQueueGuardsList)
462 self.actions.append(self.hgQueueListGuardsAct) 482 self.actions.append(self.hgQueueListGuardsAct)
463 483
464 self.hgQueueListAllGuardsAct = E5Action(self.trUtf8('List All Guards'), 484 self.hgQueueListAllGuardsAct = E5Action(self.trUtf8('List All Guards'),
465 self.trUtf8('List All Guards...'), 485 self.trUtf8('List All Guards...'),
466 0, 0, self, 'mercurial_queues_guards_list_all') 486 0, 0, self, 'mercurial_queues_guards_list_all')
469 )) 489 ))
470 self.hgQueueListAllGuardsAct.setWhatsThis(self.trUtf8( 490 self.hgQueueListAllGuardsAct.setWhatsThis(self.trUtf8(
471 """<b>List All Guards</b>""" 491 """<b>List All Guards</b>"""
472 """<p>This lists all guards of all patches.</p>""" 492 """<p>This lists all guards of all patches.</p>"""
473 )) 493 ))
474 self.hgQueueListAllGuardsAct.triggered[()].connect(self.__hgQueueGuardsListAll) 494 self.hgQueueListAllGuardsAct.triggered[()].connect(
495 self.__hgQueueGuardsListAll)
475 self.actions.append(self.hgQueueListAllGuardsAct) 496 self.actions.append(self.hgQueueListAllGuardsAct)
476 497
477 self.hgQueueActivateGuardsAct = E5Action(self.trUtf8('Set Active Guards'), 498 self.hgQueueActivateGuardsAct = E5Action(
478 self.trUtf8('Set Active Guards...'), 499 self.trUtf8('Set Active Guards'),
479 0, 0, self, 'mercurial_queues_guards_set_active') 500 self.trUtf8('Set Active Guards...'),
501 0, 0, self, 'mercurial_queues_guards_set_active')
480 self.hgQueueActivateGuardsAct.setStatusTip(self.trUtf8( 502 self.hgQueueActivateGuardsAct.setStatusTip(self.trUtf8(
481 'Set the list of active guards' 503 'Set the list of active guards'
482 )) 504 ))
483 self.hgQueueActivateGuardsAct.setWhatsThis(self.trUtf8( 505 self.hgQueueActivateGuardsAct.setWhatsThis(self.trUtf8(
484 """<b>Set Active Guards</b>""" 506 """<b>Set Active Guards</b>"""
485 """<p>This opens a dialog to set the active guards.</p>""" 507 """<p>This opens a dialog to set the active guards.</p>"""
486 )) 508 ))
487 self.hgQueueActivateGuardsAct.triggered[()].connect(self.__hgQueueGuardsSetActive) 509 self.hgQueueActivateGuardsAct.triggered[()].connect(
510 self.__hgQueueGuardsSetActive)
488 self.actions.append(self.hgQueueActivateGuardsAct) 511 self.actions.append(self.hgQueueActivateGuardsAct)
489 512
490 self.hgQueueDeactivateGuardsAct = E5Action(self.trUtf8('Deactivate Guards'), 513 self.hgQueueDeactivateGuardsAct = E5Action(
491 self.trUtf8('Deactivate Guards...'), 514 self.trUtf8('Deactivate Guards'),
492 0, 0, self, 'mercurial_queues_guards_deactivate') 515 self.trUtf8('Deactivate Guards...'),
516 0, 0, self, 'mercurial_queues_guards_deactivate')
493 self.hgQueueDeactivateGuardsAct.setStatusTip(self.trUtf8( 517 self.hgQueueDeactivateGuardsAct.setStatusTip(self.trUtf8(
494 'Deactivate all active guards' 518 'Deactivate all active guards'
495 )) 519 ))
496 self.hgQueueDeactivateGuardsAct.setWhatsThis(self.trUtf8( 520 self.hgQueueDeactivateGuardsAct.setWhatsThis(self.trUtf8(
497 """<b>Deactivate Guards</b>""" 521 """<b>Deactivate Guards</b>"""
564 588
565 self.hgQueuePurgeQueueAct = E5Action(self.trUtf8('Purge Queue'), 589 self.hgQueuePurgeQueueAct = E5Action(self.trUtf8('Purge Queue'),
566 self.trUtf8('Purge Queue'), 590 self.trUtf8('Purge Queue'),
567 0, 0, self, 'mercurial_queues_purge_queue') 591 0, 0, self, 'mercurial_queues_purge_queue')
568 self.hgQueuePurgeQueueAct.setStatusTip(self.trUtf8( 592 self.hgQueuePurgeQueueAct.setStatusTip(self.trUtf8(
569 'Delete the reference to a patch queue and remove the patch directory' 593 'Delete the reference to a patch queue and remove the patch'
594 ' directory'
570 )) 595 ))
571 self.hgQueuePurgeQueueAct.setWhatsThis(self.trUtf8( 596 self.hgQueuePurgeQueueAct.setWhatsThis(self.trUtf8(
572 """<b>Purge Queue</b>""" 597 """<b>Purge Queue</b>"""
573 """<p>This deletes the reference to a patch queue and removes""" 598 """<p>This deletes the reference to a patch queue and removes"""
574 """ the patch directory.</p>""" 599 """ the patch directory.</p>"""
717 def __hgQueueRefreshPatchMessage(self): 742 def __hgQueueRefreshPatchMessage(self):
718 """ 743 """
719 Private slot used to refresh the current patch and its commit message. 744 Private slot used to refresh the current patch and its commit message.
720 """ 745 """
721 self.vcs.getExtensionObject("mq")\ 746 self.vcs.getExtensionObject("mq")\
722 .hgQueueRefreshPatch(self.project.getProjectPath(), editMessage=True) 747 .hgQueueRefreshPatch(self.project.getProjectPath(),
748 editMessage=True)
723 749
724 def __hgQueueShowPatch(self): 750 def __hgQueueShowPatch(self):
725 """ 751 """
726 Private slot used to show the contents of the current patch. 752 Private slot used to show the contents of the current patch.
727 """ 753 """
736 .hgQueueShowHeader(self.project.getProjectPath()) 762 .hgQueueShowHeader(self.project.getProjectPath())
737 763
738 def __hgQueuePushPopPatches(self, name, operation, all=False, named=False, 764 def __hgQueuePushPopPatches(self, name, operation, all=False, named=False,
739 force=False): 765 force=False):
740 """ 766 """
741 Private method to push patches onto the stack or pop patches off the stack. 767 Private method to push patches onto the stack or pop patches off the
768 stack.
742 769
743 @param name file/directory name (string) 770 @param name file/directory name (string)
744 @param operation operation type to be performed (Queues.POP, 771 @param operation operation type to be performed (Queues.POP,
745 Queues.PUSH, Queues.GOTO) 772 Queues.PUSH, Queues.GOTO)
746 @keyparam all flag indicating to push/pop all (boolean) 773 @keyparam all flag indicating to push/pop all (boolean)
747 @keyparam named flag indicating to push/pop until a named patch 774 @keyparam named flag indicating to push/pop until a named patch
748 is at the top of the stack (boolean) 775 is at the top of the stack (boolean)
749 @keyparam force flag indicating a forceful pop (boolean) 776 @keyparam force flag indicating a forceful pop (boolean)
750 """ 777 """
751 shouldReopen = self.vcs.getExtensionObject("mq")\ 778 shouldReopen = self.vcs.getExtensionObject("mq")\
752 .hgQueuePushPopPatches(name, operation=operation, all=all, named=named, 779 .hgQueuePushPopPatches(name, operation=operation, all=all,
753 force=force) 780 named=named, force=force)
754 if shouldReopen: 781 if shouldReopen:
755 res = E5MessageBox.yesNo(None, 782 res = E5MessageBox.yesNo(None,
756 self.trUtf8("Changing Applied Patches"), 783 self.trUtf8("Changing Applied Patches"),
757 self.trUtf8("""The project should be reread. Do this now?"""), 784 self.trUtf8("""The project should be reread. Do this now?"""),
758 yesDefault=True) 785 yesDefault=True)

eric ide

mercurial