486 """<b>Configure</b>""" |
487 """<b>Configure</b>""" |
487 """<p>Show the configuration dialog with the Mercurial page selected.</p>""" |
488 """<p>Show the configuration dialog with the Mercurial page selected.</p>""" |
488 )) |
489 )) |
489 self.connect(self.hgConfigAct, SIGNAL('triggered()'), self.__hgConfigure) |
490 self.connect(self.hgConfigAct, SIGNAL('triggered()'), self.__hgConfigure) |
490 self.actions.append(self.hgConfigAct) |
491 self.actions.append(self.hgConfigAct) |
|
492 |
|
493 self.hgRepoConfigAct = E5Action(self.trUtf8('Edit repository config'), |
|
494 self.trUtf8('Edit repository config...'), |
|
495 0, 0, self, 'mercurial_repo_configure') |
|
496 self.hgRepoConfigAct.setStatusTip(self.trUtf8( |
|
497 'Show an editor to edit the repository config file' |
|
498 )) |
|
499 self.hgRepoConfigAct.setWhatsThis(self.trUtf8( |
|
500 """<b>Edit repository config</b>""" |
|
501 """<p>Show an editor to edit the repository config file.</p>""" |
|
502 )) |
|
503 self.connect(self.hgRepoConfigAct, SIGNAL('triggered()'), self.__hgEditRepoConfig) |
|
504 self.actions.append(self.hgRepoConfigAct) |
|
505 |
|
506 self.hgShowConfigAct = E5Action(self.trUtf8('Show combined config settings'), |
|
507 self.trUtf8('Show combined config settings...'), |
|
508 0, 0, self, 'mercurial_show_config') |
|
509 self.hgShowConfigAct.setStatusTip(self.trUtf8( |
|
510 'Show the combined config settings from all config files' |
|
511 )) |
|
512 self.hgShowConfigAct.setWhatsThis(self.trUtf8( |
|
513 """<b>Show combined config settings</b>""" |
|
514 """<p>This shows the combined config settings from all config files.</p>""" |
|
515 )) |
|
516 self.connect(self.hgShowConfigAct, SIGNAL('triggered()'), self.__hgShowConfig) |
|
517 self.actions.append(self.hgShowConfigAct) |
|
518 |
|
519 self.hgShowPathsAct = E5Action(self.trUtf8('Show paths'), |
|
520 self.trUtf8('Show paths...'), |
|
521 0, 0, self, 'mercurial_show_paths') |
|
522 self.hgShowPathsAct.setStatusTip(self.trUtf8( |
|
523 'Show the aliases for remote repositories' |
|
524 )) |
|
525 self.hgShowPathsAct.setWhatsThis(self.trUtf8( |
|
526 """<b>Show paths</b>""" |
|
527 """<p>This shows the aliases for remote repositories.</p>""" |
|
528 )) |
|
529 self.connect(self.hgShowPathsAct, SIGNAL('triggered()'), self.__hgShowPaths) |
|
530 self.actions.append(self.hgShowPathsAct) |
|
531 |
|
532 self.hgVerifyAct = E5Action(self.trUtf8('Verify repository'), |
|
533 self.trUtf8('Verify repository...'), |
|
534 0, 0, self, 'mercurial_verify') |
|
535 self.hgVerifyAct.setStatusTip(self.trUtf8( |
|
536 'Verify the integrity of the repository' |
|
537 )) |
|
538 self.hgVerifyAct.setWhatsThis(self.trUtf8( |
|
539 """<b>Verify repository</b>""" |
|
540 """<p>This verifies the integrity of the repository.</p>""" |
|
541 )) |
|
542 self.connect(self.hgVerifyAct, SIGNAL('triggered()'), self.__hgVerify) |
|
543 self.actions.append(self.hgVerifyAct) |
|
544 |
|
545 self.hgRecoverAct = E5Action(self.trUtf8('Recover'), |
|
546 self.trUtf8('Recover...'), |
|
547 0, 0, self, 'mercurial_recover') |
|
548 self.hgRecoverAct.setStatusTip(self.trUtf8( |
|
549 'Recover from an interrupted transaction' |
|
550 )) |
|
551 self.hgRecoverAct.setWhatsThis(self.trUtf8( |
|
552 """<b>Recover</b>""" |
|
553 """<p>This recovers from an interrupted transaction.</p>""" |
|
554 )) |
|
555 self.connect(self.hgRecoverAct, SIGNAL('triggered()'), self.__hgRecover) |
|
556 self.actions.append(self.hgRecoverAct) |
491 |
557 |
492 def initMenu(self, menu): |
558 def initMenu(self, menu): |
493 """ |
559 """ |
494 Public method to generate the VCS menu. |
560 Public method to generate the VCS menu. |
495 |
561 |
496 @param menu reference to the menu to be populated (QMenu) |
562 @param menu reference to the menu to be populated (QMenu) |
497 """ |
563 """ |
498 menu.clear() |
564 menu.clear() |
|
565 |
|
566 adminMenu = QMenu(self.trUtf8("Repository Administration"), menu) |
|
567 adminMenu.addAction(self.hgShowPathsAct) |
|
568 adminMenu.addSeparator() |
|
569 adminMenu.addAction(self.hgShowConfigAct) |
|
570 adminMenu.addAction(self.hgRepoConfigAct) |
|
571 adminMenu.addSeparator() |
|
572 adminMenu.addAction(self.hgRecoverAct) |
|
573 adminMenu.addSeparator() |
|
574 adminMenu.addAction(self.hgVerifyAct) |
499 |
575 |
500 act = menu.addAction( |
576 act = menu.addAction( |
501 UI.PixmapCache.getIcon( |
577 UI.PixmapCache.getIcon( |
502 os.path.join("VcsPlugins", "vcsMercurial", "icons", "mercurial.png")), |
578 os.path.join("VcsPlugins", "vcsMercurial", "icons", "mercurial.png")), |
503 self.vcs.vcsName(), self._vcsInfoDisplay) |
579 self.vcs.vcsName(), self._vcsInfoDisplay) |
650 if Preferences.getVCS("AutoSaveProject"): |
728 if Preferences.getVCS("AutoSaveProject"): |
651 self.project.saveProject() |
729 self.project.saveProject() |
652 if Preferences.getVCS("AutoSaveFiles"): |
730 if Preferences.getVCS("AutoSaveFiles"): |
653 self.project.saveAllScripts() |
731 self.project.saveAllScripts() |
654 self.vcs.vcsCommit(self.project.ppath, '', closeBranch = True) |
732 self.vcs.vcsCommit(self.project.ppath, '', closeBranch = True) |
|
733 |
|
734 def __hgEditRepoConfig(self): |
|
735 """ |
|
736 Protected slot used to edit the repository config file. |
|
737 """ |
|
738 self.vcs.hgEditConfig(self.project.ppath) |
|
739 |
|
740 def __hgShowConfig(self): |
|
741 """ |
|
742 Protected slot used to show the combined config. |
|
743 """ |
|
744 self.vcs.hgShowConfig(self.project.ppath) |
|
745 |
|
746 def __hgVerify(self): |
|
747 """ |
|
748 Protected slot used to verify the integrity of the repository. |
|
749 """ |
|
750 self.vcs.hgVerify(self.project.ppath) |
|
751 |
|
752 def __hgShowPaths(self): |
|
753 """ |
|
754 Protected slot used to show the aliases for remote repositories. |
|
755 """ |
|
756 self.vcs.hgShowPaths(self.project.ppath) |
|
757 |
|
758 def __hgRecover(self): |
|
759 """ |
|
760 Protected slot used to recover from an interrupted transaction. |
|
761 """ |
|
762 self.vcs.hgRecover(self.project.ppath) |