7 Module implementing the strip extension project helper. |
7 Module implementing the strip extension project helper. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtWidgets import QMenu |
10 from PyQt6.QtWidgets import QMenu |
11 |
11 |
12 from E5Gui.E5Action import E5Action |
12 from E5Gui.EricAction import EricAction |
13 from E5Gui import E5MessageBox |
13 from E5Gui import EricMessageBox |
14 |
14 |
15 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
15 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
16 |
16 |
17 import UI.PixmapCache |
17 import UI.PixmapCache |
18 |
18 |
29 |
29 |
30 def initActions(self): |
30 def initActions(self): |
31 """ |
31 """ |
32 Public method to generate the action objects. |
32 Public method to generate the action objects. |
33 """ |
33 """ |
34 self.hgStripAct = E5Action( |
34 self.hgStripAct = EricAction( |
35 self.tr('Strip changesets'), |
35 self.tr('Strip changesets'), |
36 UI.PixmapCache.getIcon("fileDelete"), |
36 UI.PixmapCache.getIcon("fileDelete"), |
37 self.tr('Strip changesets'), |
37 self.tr('Strip changesets'), |
38 0, 0, self, 'mercurial_strip') |
38 0, 0, self, 'mercurial_strip') |
39 self.hgStripAct.setStatusTip(self.tr( |
39 self.hgStripAct.setStatusTip(self.tr( |
78 Private slot used to strip revisions from a repository. |
78 Private slot used to strip revisions from a repository. |
79 """ |
79 """ |
80 shouldReopen = self.vcs.getExtensionObject("strip").hgStrip( |
80 shouldReopen = self.vcs.getExtensionObject("strip").hgStrip( |
81 self.project.getProjectPath()) |
81 self.project.getProjectPath()) |
82 if shouldReopen: |
82 if shouldReopen: |
83 res = E5MessageBox.yesNo( |
83 res = EricMessageBox.yesNo( |
84 None, |
84 None, |
85 self.tr("Strip"), |
85 self.tr("Strip"), |
86 self.tr("""The project should be reread. Do this now?"""), |
86 self.tr("""The project should be reread. Do this now?"""), |
87 yesDefault=True) |
87 yesDefault=True) |
88 if res: |
88 if res: |