833 """<b>Import Patch</b>""" |
833 """<b>Import Patch</b>""" |
834 """<p>This imports a patch from a patch file into the project.</p>""" |
834 """<p>This imports a patch from a patch file into the project.</p>""" |
835 )) |
835 )) |
836 self.hgImportAct.triggered[()].connect(self.__hgImport) |
836 self.hgImportAct.triggered[()].connect(self.__hgImport) |
837 self.actions.append(self.hgImportAct) |
837 self.actions.append(self.hgImportAct) |
|
838 |
|
839 self.hgExportAct = E5Action(self.trUtf8('Export Patches'), |
|
840 self.trUtf8('Export Patches...'), |
|
841 0, 0, self, 'mercurial_import') |
|
842 self.hgExportAct.setStatusTip(self.trUtf8( |
|
843 'Export revisions to patch files' |
|
844 )) |
|
845 self.hgExportAct.setWhatsThis(self.trUtf8( |
|
846 """<b>Export Patches</b>""" |
|
847 """<p>This exports revisions of the project to patch files.</p>""" |
|
848 )) |
|
849 self.hgExportAct.triggered[()].connect(self.__hgExport) |
|
850 self.actions.append(self.hgExportAct) |
838 |
851 |
839 def initMenu(self, menu): |
852 def initMenu(self, menu): |
840 """ |
853 """ |
841 Public method to generate the VCS menu. |
854 Public method to generate the VCS menu. |
842 |
855 |
885 self.subMenus.append(bundleMenu) |
898 self.subMenus.append(bundleMenu) |
886 |
899 |
887 patchMenu = QMenu(self.trUtf8("Patch Management"), menu) |
900 patchMenu = QMenu(self.trUtf8("Patch Management"), menu) |
888 patchMenu.setTearOffEnabled(True) |
901 patchMenu.setTearOffEnabled(True) |
889 patchMenu.addAction(self.hgImportAct) |
902 patchMenu.addAction(self.hgImportAct) |
|
903 patchMenu.addAction(self.hgExportAct) |
890 self.subMenus.append(patchMenu) |
904 self.subMenus.append(patchMenu) |
891 |
905 |
892 bisectMenu = QMenu(self.trUtf8("Bisect"), menu) |
906 bisectMenu = QMenu(self.trUtf8("Bisect"), menu) |
893 bisectMenu.setTearOffEnabled(True) |
907 bisectMenu.setTearOffEnabled(True) |
894 bisectMenu.addAction(self.hgBisectGoodAct) |
908 bisectMenu.addAction(self.hgBisectGoodAct) |
1254 self.trUtf8("""The project should be reread. Do this now?"""), |
1268 self.trUtf8("""The project should be reread. Do this now?"""), |
1255 yesDefault=True) |
1269 yesDefault=True) |
1256 if res: |
1270 if res: |
1257 self.project.reopenProject() |
1271 self.project.reopenProject() |
1258 |
1272 |
|
1273 def __hgExport(self): |
|
1274 """ |
|
1275 Private slot used to export revisions to patch files. |
|
1276 """ |
|
1277 self.vcs.hgExport(self.project.ppath) |
|
1278 |
1259 def __hgRevert(self): |
1279 def __hgRevert(self): |
1260 """ |
1280 """ |
1261 Private slot used to revert changes made to the local project. |
1281 Private slot used to revert changes made to the local project. |
1262 """ |
1282 """ |
1263 shouldReopen = self.vcs.hgRevert(self.project.ppath) |
1283 shouldReopen = self.vcs.hgRevert(self.project.ppath) |