565 """<b>Create .hgignore</b>""" |
565 """<b>Create .hgignore</b>""" |
566 """<p>This creates a .hgignore file with default values.</p>""" |
566 """<p>This creates a .hgignore file with default values.</p>""" |
567 )) |
567 )) |
568 self.connect(self.hgCreateIgnoreAct, SIGNAL('triggered()'), self.__hgCreateIgnore) |
568 self.connect(self.hgCreateIgnoreAct, SIGNAL('triggered()'), self.__hgCreateIgnore) |
569 self.actions.append(self.hgCreateIgnoreAct) |
569 self.actions.append(self.hgCreateIgnoreAct) |
|
570 |
|
571 self.hgBundleAct = E5Action(self.trUtf8('Create changegroup'), |
|
572 self.trUtf8('Create changegroup...'), |
|
573 0, 0, self, 'mercurial_bundle') |
|
574 self.hgBundleAct.setStatusTip(self.trUtf8( |
|
575 'Create changegroup file collecting changesets' |
|
576 )) |
|
577 self.hgBundleAct.setWhatsThis(self.trUtf8( |
|
578 """<b>Create changegroup</b>""" |
|
579 """<p>This creates a changegroup file collecting selected changesets""" |
|
580 """ (hg bundle).</p>""" |
|
581 )) |
|
582 self.connect(self.hgBundleAct, SIGNAL('triggered()'), self.__hgBundle) |
|
583 self.actions.append(self.hgBundleAct) |
|
584 |
|
585 self.hgUnbundleAct = E5Action(self.trUtf8('Apply changegroups'), |
|
586 self.trUtf8('Apply changegroups...'), |
|
587 0, 0, self, 'mercurial_unbundle') |
|
588 self.hgUnbundleAct.setStatusTip(self.trUtf8( |
|
589 'Apply one or several changegroup files' |
|
590 )) |
|
591 self.hgUnbundleAct.setWhatsThis(self.trUtf8( |
|
592 """<b>Apply changegroups</b>""" |
|
593 """<p>This applies one or several changegroup files generated by""" |
|
594 """ the 'Create changegroup' action (hg unbundle).</p>""" |
|
595 )) |
|
596 self.connect(self.hgUnbundleAct, SIGNAL('triggered()'), self.__hgUnbundle) |
|
597 self.actions.append(self.hgUnbundleAct) |
570 |
598 |
571 def initMenu(self, menu): |
599 def initMenu(self, menu): |
572 """ |
600 """ |
573 Public method to generate the VCS menu. |
601 Public method to generate the VCS menu. |
574 |
602 |
590 adminMenu.addSeparator() |
618 adminMenu.addSeparator() |
591 adminMenu.addAction(self.hgRecoverAct) |
619 adminMenu.addAction(self.hgRecoverAct) |
592 adminMenu.addSeparator() |
620 adminMenu.addSeparator() |
593 adminMenu.addAction(self.hgVerifyAct) |
621 adminMenu.addAction(self.hgVerifyAct) |
594 |
622 |
|
623 bundleMenu = QMenu(self.trUtf8("Changegroup Management"), menu) |
|
624 bundleMenu.addAction(self.hgBundleAct) |
|
625 bundleMenu.addAction(self.hgUnbundleAct) |
|
626 |
595 act = menu.addAction( |
627 act = menu.addAction( |
596 UI.PixmapCache.getIcon( |
628 UI.PixmapCache.getIcon( |
597 os.path.join("VcsPlugins", "vcsMercurial", "icons", "mercurial.png")), |
629 os.path.join("VcsPlugins", "vcsMercurial", "icons", "mercurial.png")), |
598 self.vcs.vcsName(), self._vcsInfoDisplay) |
630 self.vcs.vcsName(), self._vcsInfoDisplay) |
599 font = act.font() |
631 font = act.font() |
607 menu.addSeparator() |
639 menu.addSeparator() |
608 menu.addAction(self.vcsCommitAct) |
640 menu.addAction(self.vcsCommitAct) |
609 menu.addAction(self.hgOutgoingAct) |
641 menu.addAction(self.hgOutgoingAct) |
610 menu.addAction(self.hgPushAct) |
642 menu.addAction(self.hgPushAct) |
611 menu.addSeparator() |
643 menu.addSeparator() |
|
644 menu.addMenu(bundleMenu) |
|
645 menu.addSeparator() |
612 menu.addAction(self.vcsNewAct) |
646 menu.addAction(self.vcsNewAct) |
613 menu.addAction(self.vcsExportAct) |
647 menu.addAction(self.vcsExportAct) |
614 menu.addSeparator() |
648 menu.addSeparator() |
615 menu.addAction(self.vcsAddAct) |
649 menu.addAction(self.vcsAddAct) |
616 menu.addAction(self.vcsRemoveAct) |
650 menu.addAction(self.vcsRemoveAct) |
779 def __hgCreateIgnore(self): |
813 def __hgCreateIgnore(self): |
780 """ |
814 """ |
781 Protected slot used to create a .hgignore file for the project. |
815 Protected slot used to create a .hgignore file for the project. |
782 """ |
816 """ |
783 self.vcs.hgCreateIgnoreFile(self.project.ppath, autoAdd = True) |
817 self.vcs.hgCreateIgnoreFile(self.project.ppath, autoAdd = True) |
|
818 |
|
819 def __hgBundle(self): |
|
820 """ |
|
821 Protected slot used to create a changegroup file. |
|
822 """ |
|
823 self.vcs.hgBundle(self.project.ppath) |
|
824 |
|
825 def __hgUnbundle(self): |
|
826 """ |
|
827 Protected slot used to apply changegroup files. |
|
828 """ |
|
829 self.vcs.hgUnbundle(self.project.ppath) |