391 """<p>This pushes or pops patches until a named patch is at the""" |
392 """<p>This pushes or pops patches until a named patch is at the""" |
392 """ top of the stack overwriting any local changes.</p>""" |
393 """ top of the stack overwriting any local changes.</p>""" |
393 )) |
394 )) |
394 self.hgQueueGotoForceAct.triggered[()].connect(self.__hgQueueGotoPatchForced) |
395 self.hgQueueGotoForceAct.triggered[()].connect(self.__hgQueueGotoPatchForced) |
395 self.actions.append(self.hgQueueGotoForceAct) |
396 self.actions.append(self.hgQueueGotoForceAct) |
|
397 |
|
398 |
|
399 def __initGuardsActions(self): |
|
400 """ |
|
401 Public method to generate the guards action objects. |
|
402 """ |
|
403 self.hgQueueDefineGuardsAct = E5Action(self.trUtf8('Define Guards'), |
|
404 self.trUtf8('Define Guards...'), |
|
405 0, 0, self, 'mercurial_queues_guards_define') |
|
406 self.hgQueueDefineGuardsAct.setStatusTip(self.trUtf8( |
|
407 'Define guards for the current or a named patch' |
|
408 )) |
|
409 self.hgQueueDefineGuardsAct.setWhatsThis(self.trUtf8( |
|
410 """<b>Define Guards</b>""" |
|
411 """<p>This opens a dialog to define guards for the current""" |
|
412 """ or a named patch.</p>""" |
|
413 )) |
|
414 self.hgQueueDefineGuardsAct.triggered[()].connect(self.__hgQueueGuardsDefine) |
|
415 self.actions.append(self.hgQueueDefineGuardsAct) |
|
416 |
|
417 self.hgQueueDropAllGuardsAct = E5Action(self.trUtf8('Drop All Guards'), |
|
418 self.trUtf8('Drop All Guards...'), |
|
419 0, 0, self, 'mercurial_queues_guards_drop_all') |
|
420 self.hgQueueDropAllGuardsAct.setStatusTip(self.trUtf8( |
|
421 'Drop all guards of the current or a named patch' |
|
422 )) |
|
423 self.hgQueueDropAllGuardsAct.setWhatsThis(self.trUtf8( |
|
424 """<b>Drop All Guards</b>""" |
|
425 """<p>This drops all guards of the current or a named patch.</p>""" |
|
426 )) |
|
427 self.hgQueueDropAllGuardsAct.triggered[()].connect(self.__hgQueueGuardsDropAll) |
|
428 self.actions.append(self.hgQueueDropAllGuardsAct) |
|
429 |
|
430 self.hgQueueListGuardsAct = E5Action(self.trUtf8('List Guards'), |
|
431 self.trUtf8('List Guards...'), |
|
432 0, 0, self, 'mercurial_queues_guards_list') |
|
433 self.hgQueueListGuardsAct.setStatusTip(self.trUtf8( |
|
434 'List guards of the current or a named patch' |
|
435 )) |
|
436 self.hgQueueListGuardsAct.setWhatsThis(self.trUtf8( |
|
437 """<b>List Guards</b>""" |
|
438 """<p>This lists the guards of the current or a named patch.</p>""" |
|
439 )) |
|
440 self.hgQueueListGuardsAct.triggered[()].connect(self.__hgQueueGuardsList) |
|
441 self.actions.append(self.hgQueueListGuardsAct) |
|
442 |
|
443 self.hgQueueListAllGuardsAct = E5Action(self.trUtf8('List All Guards'), |
|
444 self.trUtf8('List All Guards...'), |
|
445 0, 0, self, 'mercurial_queues_guards_list_all') |
|
446 self.hgQueueListAllGuardsAct.setStatusTip(self.trUtf8( |
|
447 'List all guards of all patches' |
|
448 )) |
|
449 self.hgQueueListAllGuardsAct.setWhatsThis(self.trUtf8( |
|
450 """<b>List All Guards</b>""" |
|
451 """<p>This lists all guards of all patches.</p>""" |
|
452 )) |
|
453 self.hgQueueListAllGuardsAct.triggered[()].connect(self.__hgQueueGuardsListAll) |
|
454 self.actions.append(self.hgQueueListAllGuardsAct) |
|
455 |
|
456 self.hgQueueActivateGuardsAct = E5Action(self.trUtf8('Set Active Guards'), |
|
457 self.trUtf8('Set Active Guards...'), |
|
458 0, 0, self, 'mercurial_queues_guards_set_active') |
|
459 self.hgQueueActivateGuardsAct.setStatusTip(self.trUtf8( |
|
460 'Set the list of active guards' |
|
461 )) |
|
462 self.hgQueueActivateGuardsAct.setWhatsThis(self.trUtf8( |
|
463 """<b>Set Active Guards</b>""" |
|
464 """<p>This opens a dialog to set the active guards.</p>""" |
|
465 )) |
|
466 self.hgQueueActivateGuardsAct.triggered[()].connect(self.__hgQueueGuardsSetActive) |
|
467 self.actions.append(self.hgQueueActivateGuardsAct) |
|
468 |
|
469 self.hgQueueDeactivateGuardsAct = E5Action(self.trUtf8('Deactivate Guards'), |
|
470 self.trUtf8('Deactivate Guards...'), |
|
471 0, 0, self, 'mercurial_queues_guards_deactivate') |
|
472 self.hgQueueDeactivateGuardsAct.setStatusTip(self.trUtf8( |
|
473 'Deactivate all active guards' |
|
474 )) |
|
475 self.hgQueueDeactivateGuardsAct.setWhatsThis(self.trUtf8( |
|
476 """<b>Deactivate Guards</b>""" |
|
477 """<p>This deactivates all active guards.</p>""" |
|
478 )) |
|
479 self.hgQueueDeactivateGuardsAct.triggered[()].connect( |
|
480 self.__hgQueueGuardsDeactivate) |
|
481 self.actions.append(self.hgQueueDeactivateGuardsAct) |
|
482 |
|
483 self.hgQueueIdentifyActiveGuardsAct = E5Action( |
|
484 self.trUtf8('Identify Active Guards'), |
|
485 self.trUtf8('Identify Active Guards...'), |
|
486 0, 0, self, 'mercurial_queues_guards_identify_active') |
|
487 self.hgQueueIdentifyActiveGuardsAct.setStatusTip(self.trUtf8( |
|
488 'Show a list of active guards and affected patches' |
|
489 )) |
|
490 self.hgQueueIdentifyActiveGuardsAct.setWhatsThis(self.trUtf8( |
|
491 """<b>Identify Active Guards</b>""" |
|
492 """<p>This opens a dialog show a list of active guards and the""" |
|
493 """ patches directly affected by them.</p>""" |
|
494 )) |
|
495 self.hgQueueIdentifyActiveGuardsAct.triggered[()].connect( |
|
496 self.__hgQueueGuardsIdentifyActive) |
|
497 self.actions.append(self.hgQueueIdentifyActiveGuardsAct) |
396 |
498 |
397 def initMenu(self, mainMenu): |
499 def initMenu(self, mainMenu): |
398 """ |
500 """ |
399 Public method to generate the VCS menu. |
501 Public method to generate the VCS menu. |
400 |
502 |
422 pushPopForceMenu.addAction(self.hgQueuePopForceAct) |
524 pushPopForceMenu.addAction(self.hgQueuePopForceAct) |
423 pushPopForceMenu.addAction(self.hgQueuePopUntilForceAct) |
525 pushPopForceMenu.addAction(self.hgQueuePopUntilForceAct) |
424 pushPopForceMenu.addAction(self.hgQueuePopAllForceAct) |
526 pushPopForceMenu.addAction(self.hgQueuePopAllForceAct) |
425 pushPopForceMenu.addSeparator() |
527 pushPopForceMenu.addSeparator() |
426 pushPopForceMenu.addAction(self.hgQueueGotoForceAct) |
528 pushPopForceMenu.addAction(self.hgQueueGotoForceAct) |
|
529 |
|
530 guardsMenu = QMenu(self.trUtf8("Guards"), menu) |
|
531 guardsMenu.addAction(self.hgQueueDefineGuardsAct) |
|
532 guardsMenu.addAction(self.hgQueueDropAllGuardsAct) |
|
533 guardsMenu.addSeparator() |
|
534 guardsMenu.addAction(self.hgQueueListGuardsAct) |
|
535 guardsMenu.addAction(self.hgQueueListAllGuardsAct) |
|
536 guardsMenu.addSeparator() |
|
537 guardsMenu.addAction(self.hgQueueActivateGuardsAct) |
|
538 guardsMenu.addAction(self.hgQueueDeactivateGuardsAct) |
|
539 guardsMenu.addSeparator() |
|
540 guardsMenu.addAction(self.hgQueueIdentifyActiveGuardsAct) |
427 |
541 |
428 menu.addAction(self.hgQueueNewAct) |
542 menu.addAction(self.hgQueueNewAct) |
429 menu.addAction(self.hgQueueRefreshAct) |
543 menu.addAction(self.hgQueueRefreshAct) |
430 menu.addAction(self.hgQueueRefreshMessageAct) |
544 menu.addAction(self.hgQueueRefreshMessageAct) |
431 menu.addAction(self.hgQueueFinishAct) |
545 menu.addAction(self.hgQueueFinishAct) |
634 """ |
750 """ |
635 Private slot used to fold patches into the current patch. |
751 Private slot used to fold patches into the current patch. |
636 """ |
752 """ |
637 self.vcs.getExtensionObject("mq")\ |
753 self.vcs.getExtensionObject("mq")\ |
638 .hgQueueFoldUnappliedPatches(self.project.getProjectPath()) |
754 .hgQueueFoldUnappliedPatches(self.project.getProjectPath()) |
|
755 |
|
756 def __hgQueueGuardsDefine(self): |
|
757 """ |
|
758 Private slot used to define guards for the current or a named patch. |
|
759 """ |
|
760 self.vcs.getExtensionObject("mq")\ |
|
761 .hgQueueGuardsDefine(self.project.getProjectPath()) |
|
762 |
|
763 def __hgQueueGuardsDropAll(self): |
|
764 """ |
|
765 Private slot used to drop all guards of the current or a named patch. |
|
766 """ |
|
767 self.vcs.getExtensionObject("mq")\ |
|
768 .hgQueueGuardsDropAll(self.project.getProjectPath()) |
|
769 |
|
770 def __hgQueueGuardsList(self): |
|
771 """ |
|
772 Private slot used to list the guards for the current or a named patch. |
|
773 """ |
|
774 self.vcs.getExtensionObject("mq")\ |
|
775 .hgQueueGuardsList(self.project.getProjectPath()) |
|
776 |
|
777 def __hgQueueGuardsListAll(self): |
|
778 """ |
|
779 Private slot used to list all guards of all patches. |
|
780 """ |
|
781 self.vcs.getExtensionObject("mq")\ |
|
782 .hgQueueGuardsListAll(self.project.getProjectPath()) |
|
783 |
|
784 def __hgQueueGuardsSetActive(self): |
|
785 """ |
|
786 Private slot used to set the active guards. |
|
787 """ |
|
788 pass |
|
789 |
|
790 def __hgQueueGuardsDeactivate(self): |
|
791 """ |
|
792 Private slot used to deactivate all active guards. |
|
793 """ |
|
794 pass |
|
795 |
|
796 def __hgQueueGuardsIdentifyActive(self): |
|
797 """ |
|
798 Private slot used to list all active guards and their patches. |
|
799 """ |
|
800 pass |