Plugins/VcsPlugins/vcsMercurial/RebaseExtension/ProjectHelper.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 2525
8b507a9a2d40
parent 3023
34ce20603bf7
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
31 31
32 def initActions(self): 32 def initActions(self):
33 """ 33 """
34 Public method to generate the action objects. 34 Public method to generate the action objects.
35 """ 35 """
36 self.hgRebaseAct = E5Action(self.trUtf8('Rebase Changesets'), 36 self.hgRebaseAct = E5Action(
37 UI.PixmapCache.getIcon("vcsRebase.png"), 37 self.trUtf8('Rebase Changesets'),
38 self.trUtf8('Rebase Changesets'), 38 UI.PixmapCache.getIcon("vcsRebase.png"),
39 0, 0, self, 'mercurial_rebase') 39 self.trUtf8('Rebase Changesets'),
40 0, 0, self, 'mercurial_rebase')
40 self.hgRebaseAct.setStatusTip(self.trUtf8( 41 self.hgRebaseAct.setStatusTip(self.trUtf8(
41 'Rebase changesets to another branch' 42 'Rebase changesets to another branch'
42 )) 43 ))
43 self.hgRebaseAct.setWhatsThis(self.trUtf8( 44 self.hgRebaseAct.setWhatsThis(self.trUtf8(
44 """<b>Rebase Changesets</b>""" 45 """<b>Rebase Changesets</b>"""
105 Private slot used to rebase changesets to another branch. 106 Private slot used to rebase changesets to another branch.
106 """ 107 """
107 shouldReopen = self.vcs.getExtensionObject("rebase")\ 108 shouldReopen = self.vcs.getExtensionObject("rebase")\
108 .hgRebase(self.project.getProjectPath()) 109 .hgRebase(self.project.getProjectPath())
109 if shouldReopen: 110 if shouldReopen:
110 res = E5MessageBox.yesNo(None, 111 res = E5MessageBox.yesNo(
112 None,
111 self.trUtf8("Rebase Changesets"), 113 self.trUtf8("Rebase Changesets"),
112 self.trUtf8("""The project should be reread. Do this now?"""), 114 self.trUtf8("""The project should be reread. Do this now?"""),
113 yesDefault=True) 115 yesDefault=True)
114 if res: 116 if res:
115 self.project.reopenProject() 117 self.project.reopenProject()
119 Private slot used to continue the last rebase session after repair. 121 Private slot used to continue the last rebase session after repair.
120 """ 122 """
121 shouldReopen = self.vcs.getExtensionObject("rebase")\ 123 shouldReopen = self.vcs.getExtensionObject("rebase")\
122 .hgRebaseContinue(self.project.getProjectPath()) 124 .hgRebaseContinue(self.project.getProjectPath())
123 if shouldReopen: 125 if shouldReopen:
124 res = E5MessageBox.yesNo(None, 126 res = E5MessageBox.yesNo(
127 None,
125 self.trUtf8("Rebase Changesets (Continue)"), 128 self.trUtf8("Rebase Changesets (Continue)"),
126 self.trUtf8("""The project should be reread. Do this now?"""), 129 self.trUtf8("""The project should be reread. Do this now?"""),
127 yesDefault=True) 130 yesDefault=True)
128 if res: 131 if res:
129 self.project.reopenProject() 132 self.project.reopenProject()
133 Private slot used to abort the last rebase session. 136 Private slot used to abort the last rebase session.
134 """ 137 """
135 shouldReopen = self.vcs.getExtensionObject("rebase")\ 138 shouldReopen = self.vcs.getExtensionObject("rebase")\
136 .hgRebaseAbort(self.project.getProjectPath()) 139 .hgRebaseAbort(self.project.getProjectPath())
137 if shouldReopen: 140 if shouldReopen:
138 res = E5MessageBox.yesNo(None, 141 res = E5MessageBox.yesNo(
142 None,
139 self.trUtf8("Rebase Changesets (Abort)"), 143 self.trUtf8("Rebase Changesets (Abort)"),
140 self.trUtf8("""The project should be reread. Do this now?"""), 144 self.trUtf8("""The project should be reread. Do this now?"""),
141 yesDefault=True) 145 yesDefault=True)
142 if res: 146 if res:
143 self.project.reopenProject() 147 self.project.reopenProject()

eric ide

mercurial