src/eric7/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
24 24
25 class HgProjectHelper(VcsProjectHelper): 25 class HgProjectHelper(VcsProjectHelper):
26 """ 26 """
27 Class implementing the VCS project helper for Mercurial. 27 Class implementing the VCS project helper for Mercurial.
28 """ 28 """
29
29 def __init__(self, vcsObject, projectObject, parent=None, name=None): 30 def __init__(self, vcsObject, projectObject, parent=None, name=None):
30 """ 31 """
31 Constructor 32 Constructor
32 33
33 @param vcsObject reference to the vcs object 34 @param vcsObject reference to the vcs object
34 @param projectObject reference to the project object 35 @param projectObject reference to the project object
35 @param parent parent widget (QWidget) 36 @param parent parent widget (QWidget)
36 @param name name of this object (string) 37 @param name name of this object (string)
37 """ 38 """
38 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name) 39 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name)
39 40
40 # instantiate the extensions 41 # instantiate the extensions
41 from .QueuesExtension.ProjectHelper import QueuesProjectHelper 42 from .QueuesExtension.ProjectHelper import QueuesProjectHelper
42 from .PurgeExtension.ProjectHelper import PurgeProjectHelper 43 from .PurgeExtension.ProjectHelper import PurgeProjectHelper
43 from .GpgExtension.ProjectHelper import GpgProjectHelper 44 from .GpgExtension.ProjectHelper import GpgProjectHelper
44 from .RebaseExtension.ProjectHelper import RebaseProjectHelper 45 from .RebaseExtension.ProjectHelper import RebaseProjectHelper
45 from .ShelveExtension.ProjectHelper import ShelveProjectHelper 46 from .ShelveExtension.ProjectHelper import ShelveProjectHelper
46 from .LargefilesExtension.ProjectHelper import LargefilesProjectHelper 47 from .LargefilesExtension.ProjectHelper import LargefilesProjectHelper
47 from .StripExtension.ProjectHelper import StripProjectHelper 48 from .StripExtension.ProjectHelper import StripProjectHelper
48 from .HisteditExtension.ProjectHelper import HisteditProjectHelper 49 from .HisteditExtension.ProjectHelper import HisteditProjectHelper
49 from .CloseheadExtension.ProjectHelper import CloseheadProjectHelper 50 from .CloseheadExtension.ProjectHelper import CloseheadProjectHelper
51
50 self.__extensions = { 52 self.__extensions = {
51 "mq": QueuesProjectHelper(), 53 "mq": QueuesProjectHelper(),
52 "purge": PurgeProjectHelper(), 54 "purge": PurgeProjectHelper(),
53 "gpg": GpgProjectHelper(), 55 "gpg": GpgProjectHelper(),
54 "rebase": RebaseProjectHelper(), 56 "rebase": RebaseProjectHelper(),
56 "largefiles": LargefilesProjectHelper(), 58 "largefiles": LargefilesProjectHelper(),
57 "strip": StripProjectHelper(), 59 "strip": StripProjectHelper(),
58 "histedit": HisteditProjectHelper(), 60 "histedit": HisteditProjectHelper(),
59 "closehead": CloseheadProjectHelper(), 61 "closehead": CloseheadProjectHelper(),
60 } 62 }
61 63
62 self.__extensionMenuTitles = {} 64 self.__extensionMenuTitles = {}
63 for extension in self.__extensions: 65 for extension in self.__extensions:
64 self.__extensionMenuTitles[ 66 self.__extensionMenuTitles[
65 self.__extensions[extension].menuTitle()] = extension 67 self.__extensions[extension].menuTitle()
66 68 ] = extension
69
67 self.__toolbarManager = None 70 self.__toolbarManager = None
68 71
69 def setObjects(self, vcsObject, projectObject): 72 def setObjects(self, vcsObject, projectObject):
70 """ 73 """
71 Public method to set references to the vcs and project objects. 74 Public method to set references to the vcs and project objects.
72 75
73 @param vcsObject reference to the vcs object 76 @param vcsObject reference to the vcs object
74 @param projectObject reference to the project object 77 @param projectObject reference to the project object
75 """ 78 """
76 self.vcs = vcsObject 79 self.vcs = vcsObject
77 self.project = projectObject 80 self.project = projectObject
78 81
79 for extension in self.__extensions.values(): 82 for extension in self.__extensions.values():
80 extension.setObjects(vcsObject, projectObject) 83 extension.setObjects(vcsObject, projectObject)
81 84
82 self.vcs.iniFileChanged.connect(self.__checkActions) 85 self.vcs.iniFileChanged.connect(self.__checkActions)
83 86
84 # add Mercurial version dependent actions here 87 # add Mercurial version dependent actions here
85 title = self.__toolbar.windowTitle() 88 title = self.__toolbar.windowTitle()
86 if self.vcs.version >= (5, 7): 89 if self.vcs.version >= (5, 7):
87 self.actions.append(self.hgBookmarkPushAllAct) 90 self.actions.append(self.hgBookmarkPushAllAct)
88 self.__toolbarManager.addAction(self.hgBookmarkPushAllAct, title) 91 self.__toolbarManager.addAction(self.hgBookmarkPushAllAct, title)
89 92
90 if self.vcs.version < (4, 7, 0): 93 if self.vcs.version < (4, 7, 0):
91 self.hgGraftStopAct.setEnabled(False) 94 self.hgGraftStopAct.setEnabled(False)
92 self.hgGraftAbortAct.setEnabled(False) 95 self.hgGraftAbortAct.setEnabled(False)
93 96
94 def getProject(self): 97 def getProject(self):
95 """ 98 """
96 Public method to get a reference to the project object. 99 Public method to get a reference to the project object.
97 100
98 @return reference to the project object (Project) 101 @return reference to the project object (Project)
99 """ 102 """
100 return self.project 103 return self.project
101 104
102 def getActions(self): 105 def getActions(self):
103 """ 106 """
104 Public method to get a list of all actions. 107 Public method to get a list of all actions.
105 108
106 @return list of all actions (list of EricAction) 109 @return list of all actions (list of EricAction)
107 """ 110 """
108 actions = self.actions[:] 111 actions = self.actions[:]
109 for extension in self.__extensions.values(): 112 for extension in self.__extensions.values():
110 actions.extend(extension.getActions()) 113 actions.extend(extension.getActions())
111 return actions 114 return actions
112 115
113 def initActions(self): 116 def initActions(self):
114 """ 117 """
115 Public method to generate the action objects. 118 Public method to generate the action objects.
116 """ 119 """
117 self.vcsNewAct = EricAction( 120 self.vcsNewAct = EricAction(
118 self.tr('New from repository'), 121 self.tr("New from repository"),
119 UI.PixmapCache.getIcon("vcsCheckout"), 122 UI.PixmapCache.getIcon("vcsCheckout"),
120 self.tr('&New from repository...'), 0, 0, 123 self.tr("&New from repository..."),
121 self, 'mercurial_new') 124 0,
122 self.vcsNewAct.setStatusTip(self.tr( 125 0,
123 'Create (clone) a new project from a Mercurial repository' 126 self,
124 )) 127 "mercurial_new",
125 self.vcsNewAct.setWhatsThis(self.tr( 128 )
126 """<b>New from repository</b>""" 129 self.vcsNewAct.setStatusTip(
127 """<p>This creates (clones) a new local project from """ 130 self.tr("Create (clone) a new project from a Mercurial repository")
128 """a Mercurial repository.</p>""" 131 )
129 )) 132 self.vcsNewAct.setWhatsThis(
133 self.tr(
134 """<b>New from repository</b>"""
135 """<p>This creates (clones) a new local project from """
136 """a Mercurial repository.</p>"""
137 )
138 )
130 self.vcsNewAct.triggered.connect(self._vcsCheckout) 139 self.vcsNewAct.triggered.connect(self._vcsCheckout)
131 self.actions.append(self.vcsNewAct) 140 self.actions.append(self.vcsNewAct)
132 141
133 self.hgIncomingAct = EricAction( 142 self.hgIncomingAct = EricAction(
134 self.tr('Show incoming log'), 143 self.tr("Show incoming log"),
135 UI.PixmapCache.getIcon("vcsUpdate"), 144 UI.PixmapCache.getIcon("vcsUpdate"),
136 self.tr('Show incoming log'), 145 self.tr("Show incoming log"),
137 0, 0, self, 'mercurial_incoming') 146 0,
138 self.hgIncomingAct.setStatusTip(self.tr( 147 0,
139 'Show the log of incoming changes' 148 self,
140 )) 149 "mercurial_incoming",
141 self.hgIncomingAct.setWhatsThis(self.tr( 150 )
142 """<b>Show incoming log</b>""" 151 self.hgIncomingAct.setStatusTip(self.tr("Show the log of incoming changes"))
143 """<p>This shows the log of changes coming into the""" 152 self.hgIncomingAct.setWhatsThis(
144 """ repository.</p>""" 153 self.tr(
145 )) 154 """<b>Show incoming log</b>"""
155 """<p>This shows the log of changes coming into the"""
156 """ repository.</p>"""
157 )
158 )
146 self.hgIncomingAct.triggered.connect(self.__hgIncoming) 159 self.hgIncomingAct.triggered.connect(self.__hgIncoming)
147 self.actions.append(self.hgIncomingAct) 160 self.actions.append(self.hgIncomingAct)
148 161
149 self.hgPullAct = EricAction( 162 self.hgPullAct = EricAction(
150 self.tr('Pull changes'), 163 self.tr("Pull changes"),
151 UI.PixmapCache.getIcon("vcsUpdate"), 164 UI.PixmapCache.getIcon("vcsUpdate"),
152 self.tr('Pull changes'), 165 self.tr("Pull changes"),
153 0, 0, self, 'mercurial_pull') 166 0,
154 self.hgPullAct.setStatusTip(self.tr( 167 0,
155 'Pull changes from a remote repository' 168 self,
156 )) 169 "mercurial_pull",
157 self.hgPullAct.setWhatsThis(self.tr( 170 )
158 """<b>Pull changes</b>""" 171 self.hgPullAct.setStatusTip(self.tr("Pull changes from a remote repository"))
159 """<p>This pulls changes from a remote repository into the """ 172 self.hgPullAct.setWhatsThis(
160 """local repository.</p>""" 173 self.tr(
161 )) 174 """<b>Pull changes</b>"""
175 """<p>This pulls changes from a remote repository into the """
176 """local repository.</p>"""
177 )
178 )
162 self.hgPullAct.triggered.connect(self.__hgPull) 179 self.hgPullAct.triggered.connect(self.__hgPull)
163 self.actions.append(self.hgPullAct) 180 self.actions.append(self.hgPullAct)
164 181
165 self.vcsUpdateAct = EricAction( 182 self.vcsUpdateAct = EricAction(
166 self.tr('Update from repository'), 183 self.tr("Update from repository"),
167 UI.PixmapCache.getIcon("vcsUpdate"), 184 UI.PixmapCache.getIcon("vcsUpdate"),
168 self.tr('&Update from repository'), 0, 0, self, 185 self.tr("&Update from repository"),
169 'mercurial_update') 186 0,
170 self.vcsUpdateAct.setStatusTip(self.tr( 187 0,
171 'Update the local project from the Mercurial repository' 188 self,
172 )) 189 "mercurial_update",
173 self.vcsUpdateAct.setWhatsThis(self.tr( 190 )
174 """<b>Update from repository</b>""" 191 self.vcsUpdateAct.setStatusTip(
175 """<p>This updates the local project from the Mercurial""" 192 self.tr("Update the local project from the Mercurial repository")
176 """ repository.</p>""" 193 )
177 )) 194 self.vcsUpdateAct.setWhatsThis(
195 self.tr(
196 """<b>Update from repository</b>"""
197 """<p>This updates the local project from the Mercurial"""
198 """ repository.</p>"""
199 )
200 )
178 self.vcsUpdateAct.triggered.connect(self._vcsUpdate) 201 self.vcsUpdateAct.triggered.connect(self._vcsUpdate)
179 self.actions.append(self.vcsUpdateAct) 202 self.actions.append(self.vcsUpdateAct)
180 203
181 self.vcsCommitAct = EricAction( 204 self.vcsCommitAct = EricAction(
182 self.tr('Commit changes to repository'), 205 self.tr("Commit changes to repository"),
183 UI.PixmapCache.getIcon("vcsCommit"), 206 UI.PixmapCache.getIcon("vcsCommit"),
184 self.tr('&Commit changes to repository...'), 0, 0, self, 207 self.tr("&Commit changes to repository..."),
185 'mercurial_commit') 208 0,
186 self.vcsCommitAct.setStatusTip(self.tr( 209 0,
187 'Commit changes to the local project to the Mercurial repository' 210 self,
188 )) 211 "mercurial_commit",
189 self.vcsCommitAct.setWhatsThis(self.tr( 212 )
190 """<b>Commit changes to repository</b>""" 213 self.vcsCommitAct.setStatusTip(
191 """<p>This commits changes to the local project to the """ 214 self.tr("Commit changes to the local project to the Mercurial repository")
192 """Mercurial repository.</p>""" 215 )
193 )) 216 self.vcsCommitAct.setWhatsThis(
217 self.tr(
218 """<b>Commit changes to repository</b>"""
219 """<p>This commits changes to the local project to the """
220 """Mercurial repository.</p>"""
221 )
222 )
194 self.vcsCommitAct.triggered.connect(self._vcsCommit) 223 self.vcsCommitAct.triggered.connect(self._vcsCommit)
195 self.actions.append(self.vcsCommitAct) 224 self.actions.append(self.vcsCommitAct)
196 225
197 self.hgOutgoingAct = EricAction( 226 self.hgOutgoingAct = EricAction(
198 self.tr('Show outgoing log'), 227 self.tr("Show outgoing log"),
199 UI.PixmapCache.getIcon("vcsCommit"), 228 UI.PixmapCache.getIcon("vcsCommit"),
200 self.tr('Show outgoing log'), 229 self.tr("Show outgoing log"),
201 0, 0, self, 'mercurial_outgoing') 230 0,
202 self.hgOutgoingAct.setStatusTip(self.tr( 231 0,
203 'Show the log of outgoing changes' 232 self,
204 )) 233 "mercurial_outgoing",
205 self.hgOutgoingAct.setWhatsThis(self.tr( 234 )
206 """<b>Show outgoing log</b>""" 235 self.hgOutgoingAct.setStatusTip(self.tr("Show the log of outgoing changes"))
207 """<p>This shows the log of changes outgoing out of the""" 236 self.hgOutgoingAct.setWhatsThis(
208 """ repository.</p>""" 237 self.tr(
209 )) 238 """<b>Show outgoing log</b>"""
239 """<p>This shows the log of changes outgoing out of the"""
240 """ repository.</p>"""
241 )
242 )
210 self.hgOutgoingAct.triggered.connect(self.__hgOutgoing) 243 self.hgOutgoingAct.triggered.connect(self.__hgOutgoing)
211 self.actions.append(self.hgOutgoingAct) 244 self.actions.append(self.hgOutgoingAct)
212 245
213 self.hgPushAct = EricAction( 246 self.hgPushAct = EricAction(
214 self.tr('Push changes'), 247 self.tr("Push changes"),
215 UI.PixmapCache.getIcon("vcsCommit"), 248 UI.PixmapCache.getIcon("vcsCommit"),
216 self.tr('Push changes'), 249 self.tr("Push changes"),
217 0, 0, self, 'mercurial_push') 250 0,
218 self.hgPushAct.setStatusTip(self.tr( 251 0,
219 'Push changes to a remote repository' 252 self,
220 )) 253 "mercurial_push",
221 self.hgPushAct.setWhatsThis(self.tr( 254 )
222 """<b>Push changes</b>""" 255 self.hgPushAct.setStatusTip(self.tr("Push changes to a remote repository"))
223 """<p>This pushes changes from the local repository to a """ 256 self.hgPushAct.setWhatsThis(
224 """remote repository.</p>""" 257 self.tr(
225 )) 258 """<b>Push changes</b>"""
259 """<p>This pushes changes from the local repository to a """
260 """remote repository.</p>"""
261 )
262 )
226 self.hgPushAct.triggered.connect(self.__hgPush) 263 self.hgPushAct.triggered.connect(self.__hgPush)
227 self.actions.append(self.hgPushAct) 264 self.actions.append(self.hgPushAct)
228 265
229 self.hgPushForcedAct = EricAction( 266 self.hgPushForcedAct = EricAction(
230 self.tr('Push changes (force)'), 267 self.tr("Push changes (force)"),
231 UI.PixmapCache.getIcon("vcsCommit"), 268 UI.PixmapCache.getIcon("vcsCommit"),
232 self.tr('Push changes (force)'), 269 self.tr("Push changes (force)"),
233 0, 0, self, 'mercurial_push_forced') 270 0,
234 self.hgPushForcedAct.setStatusTip(self.tr( 271 0,
235 'Push changes to a remote repository with force option' 272 self,
236 )) 273 "mercurial_push_forced",
237 self.hgPushForcedAct.setWhatsThis(self.tr( 274 )
238 """<b>Push changes (force)</b>""" 275 self.hgPushForcedAct.setStatusTip(
239 """<p>This pushes changes from the local repository to a """ 276 self.tr("Push changes to a remote repository with force option")
240 """remote repository using the 'force' option.</p>""" 277 )
241 )) 278 self.hgPushForcedAct.setWhatsThis(
279 self.tr(
280 """<b>Push changes (force)</b>"""
281 """<p>This pushes changes from the local repository to a """
282 """remote repository using the 'force' option.</p>"""
283 )
284 )
242 self.hgPushForcedAct.triggered.connect(self.__hgPushForced) 285 self.hgPushForcedAct.triggered.connect(self.__hgPushForced)
243 self.actions.append(self.hgPushForcedAct) 286 self.actions.append(self.hgPushForcedAct)
244 287
245 self.vcsExportAct = EricAction( 288 self.vcsExportAct = EricAction(
246 self.tr('Export from repository'), 289 self.tr("Export from repository"),
247 UI.PixmapCache.getIcon("vcsExport"), 290 UI.PixmapCache.getIcon("vcsExport"),
248 self.tr('&Export from repository...'), 291 self.tr("&Export from repository..."),
249 0, 0, self, 'mercurial_export_repo') 292 0,
250 self.vcsExportAct.setStatusTip(self.tr( 293 0,
251 'Export a project from the repository' 294 self,
252 )) 295 "mercurial_export_repo",
253 self.vcsExportAct.setWhatsThis(self.tr( 296 )
254 """<b>Export from repository</b>""" 297 self.vcsExportAct.setStatusTip(self.tr("Export a project from the repository"))
255 """<p>This exports a project from the repository.</p>""" 298 self.vcsExportAct.setWhatsThis(
256 )) 299 self.tr(
300 """<b>Export from repository</b>"""
301 """<p>This exports a project from the repository.</p>"""
302 )
303 )
257 self.vcsExportAct.triggered.connect(self._vcsExport) 304 self.vcsExportAct.triggered.connect(self._vcsExport)
258 self.actions.append(self.vcsExportAct) 305 self.actions.append(self.vcsExportAct)
259 306
260 self.hgLogBrowserAct = EricAction( 307 self.hgLogBrowserAct = EricAction(
261 self.tr('Show log browser'), 308 self.tr("Show log browser"),
262 UI.PixmapCache.getIcon("vcsLog"), 309 UI.PixmapCache.getIcon("vcsLog"),
263 self.tr('Show log browser'), 310 self.tr("Show log browser"),
264 0, 0, self, 'mercurial_log_browser') 311 0,
265 self.hgLogBrowserAct.setStatusTip(self.tr( 312 0,
266 'Show a dialog to browse the log of the local project' 313 self,
267 )) 314 "mercurial_log_browser",
268 self.hgLogBrowserAct.setWhatsThis(self.tr( 315 )
269 """<b>Show log browser</b>""" 316 self.hgLogBrowserAct.setStatusTip(
270 """<p>This shows a dialog to browse the log of the local""" 317 self.tr("Show a dialog to browse the log of the local project")
271 """ project. A limited number of entries is shown first.""" 318 )
272 """ More can be retrieved later on.</p>""" 319 self.hgLogBrowserAct.setWhatsThis(
273 )) 320 self.tr(
321 """<b>Show log browser</b>"""
322 """<p>This shows a dialog to browse the log of the local"""
323 """ project. A limited number of entries is shown first."""
324 """ More can be retrieved later on.</p>"""
325 )
326 )
274 self.hgLogBrowserAct.triggered.connect(self._vcsLogBrowser) 327 self.hgLogBrowserAct.triggered.connect(self._vcsLogBrowser)
275 self.actions.append(self.hgLogBrowserAct) 328 self.actions.append(self.hgLogBrowserAct)
276 329
277 self.vcsDiffAct = EricAction( 330 self.vcsDiffAct = EricAction(
278 self.tr('Show differences'), 331 self.tr("Show differences"),
279 UI.PixmapCache.getIcon("vcsDiff"), 332 UI.PixmapCache.getIcon("vcsDiff"),
280 self.tr('Show &difference'), 333 self.tr("Show &difference"),
281 0, 0, self, 'mercurial_diff') 334 0,
282 self.vcsDiffAct.setStatusTip(self.tr( 335 0,
283 'Show the difference of the local project to the repository' 336 self,
284 )) 337 "mercurial_diff",
285 self.vcsDiffAct.setWhatsThis(self.tr( 338 )
286 """<b>Show differences</b>""" 339 self.vcsDiffAct.setStatusTip(
287 """<p>This shows differences of the local project to the""" 340 self.tr("Show the difference of the local project to the repository")
288 """ repository.</p>""" 341 )
289 )) 342 self.vcsDiffAct.setWhatsThis(
343 self.tr(
344 """<b>Show differences</b>"""
345 """<p>This shows differences of the local project to the"""
346 """ repository.</p>"""
347 )
348 )
290 self.vcsDiffAct.triggered.connect(self._vcsDiff) 349 self.vcsDiffAct.triggered.connect(self._vcsDiff)
291 self.actions.append(self.vcsDiffAct) 350 self.actions.append(self.vcsDiffAct)
292 351
293 self.hgExtDiffAct = EricAction( 352 self.hgExtDiffAct = EricAction(
294 self.tr('Show differences (extended)'), 353 self.tr("Show differences (extended)"),
295 UI.PixmapCache.getIcon("vcsDiff"), 354 UI.PixmapCache.getIcon("vcsDiff"),
296 self.tr('Show differences (extended)'), 355 self.tr("Show differences (extended)"),
297 0, 0, self, 'mercurial_extendeddiff') 356 0,
298 self.hgExtDiffAct.setStatusTip(self.tr( 357 0,
299 'Show the difference of revisions of the project to the repository' 358 self,
300 )) 359 "mercurial_extendeddiff",
301 self.hgExtDiffAct.setWhatsThis(self.tr( 360 )
302 """<b>Show differences (extended)</b>""" 361 self.hgExtDiffAct.setStatusTip(
303 """<p>This shows differences of selectable revisions of the""" 362 self.tr("Show the difference of revisions of the project to the repository")
304 """ project.</p>""" 363 )
305 )) 364 self.hgExtDiffAct.setWhatsThis(
365 self.tr(
366 """<b>Show differences (extended)</b>"""
367 """<p>This shows differences of selectable revisions of the"""
368 """ project.</p>"""
369 )
370 )
306 self.hgExtDiffAct.triggered.connect(self.__hgExtendedDiff) 371 self.hgExtDiffAct.triggered.connect(self.__hgExtendedDiff)
307 self.actions.append(self.hgExtDiffAct) 372 self.actions.append(self.hgExtDiffAct)
308 373
309 self.vcsStatusAct = EricAction( 374 self.vcsStatusAct = EricAction(
310 self.tr('Show status'), 375 self.tr("Show status"),
311 UI.PixmapCache.getIcon("vcsStatus"), 376 UI.PixmapCache.getIcon("vcsStatus"),
312 self.tr('Show &status...'), 377 self.tr("Show &status..."),
313 0, 0, self, 'mercurial_status') 378 0,
314 self.vcsStatusAct.setStatusTip(self.tr( 379 0,
315 'Show the status of the local project' 380 self,
316 )) 381 "mercurial_status",
317 self.vcsStatusAct.setWhatsThis(self.tr( 382 )
318 """<b>Show status</b>""" 383 self.vcsStatusAct.setStatusTip(self.tr("Show the status of the local project"))
319 """<p>This shows the status of the local project.</p>""" 384 self.vcsStatusAct.setWhatsThis(
320 )) 385 self.tr(
386 """<b>Show status</b>"""
387 """<p>This shows the status of the local project.</p>"""
388 )
389 )
321 self.vcsStatusAct.triggered.connect(self._vcsStatus) 390 self.vcsStatusAct.triggered.connect(self._vcsStatus)
322 self.actions.append(self.vcsStatusAct) 391 self.actions.append(self.vcsStatusAct)
323 392
324 self.hgSummaryAct = EricAction( 393 self.hgSummaryAct = EricAction(
325 self.tr('Show Summary'), 394 self.tr("Show Summary"),
326 UI.PixmapCache.getIcon("vcsSummary"), 395 UI.PixmapCache.getIcon("vcsSummary"),
327 self.tr('Show summary...'), 396 self.tr("Show summary..."),
328 0, 0, self, 'mercurial_summary') 397 0,
329 self.hgSummaryAct.setStatusTip(self.tr( 398 0,
330 'Show summary information of the working directory status' 399 self,
331 )) 400 "mercurial_summary",
332 self.hgSummaryAct.setWhatsThis(self.tr( 401 )
333 """<b>Show summary</b>""" 402 self.hgSummaryAct.setStatusTip(
334 """<p>This shows some summary information of the working""" 403 self.tr("Show summary information of the working directory status")
335 """ directory status.</p>""" 404 )
336 )) 405 self.hgSummaryAct.setWhatsThis(
406 self.tr(
407 """<b>Show summary</b>"""
408 """<p>This shows some summary information of the working"""
409 """ directory status.</p>"""
410 )
411 )
337 self.hgSummaryAct.triggered.connect(self.__hgSummary) 412 self.hgSummaryAct.triggered.connect(self.__hgSummary)
338 self.actions.append(self.hgSummaryAct) 413 self.actions.append(self.hgSummaryAct)
339 414
340 self.hgHeadsAct = EricAction( 415 self.hgHeadsAct = EricAction(
341 self.tr('Show heads'), 416 self.tr("Show heads"), self.tr("Show heads"), 0, 0, self, "mercurial_heads"
342 self.tr('Show heads'), 417 )
343 0, 0, self, 'mercurial_heads') 418 self.hgHeadsAct.setStatusTip(self.tr("Show the heads of the repository"))
344 self.hgHeadsAct.setStatusTip(self.tr( 419 self.hgHeadsAct.setWhatsThis(
345 'Show the heads of the repository' 420 self.tr(
346 )) 421 """<b>Show heads</b>"""
347 self.hgHeadsAct.setWhatsThis(self.tr( 422 """<p>This shows the heads of the repository.</p>"""
348 """<b>Show heads</b>""" 423 )
349 """<p>This shows the heads of the repository.</p>""" 424 )
350 ))
351 self.hgHeadsAct.triggered.connect(self.__hgHeads) 425 self.hgHeadsAct.triggered.connect(self.__hgHeads)
352 self.actions.append(self.hgHeadsAct) 426 self.actions.append(self.hgHeadsAct)
353 427
354 self.hgParentsAct = EricAction( 428 self.hgParentsAct = EricAction(
355 self.tr('Show parents'), 429 self.tr("Show parents"),
356 self.tr('Show parents'), 430 self.tr("Show parents"),
357 0, 0, self, 'mercurial_parents') 431 0,
358 self.hgParentsAct.setStatusTip(self.tr( 432 0,
359 'Show the parents of the repository' 433 self,
360 )) 434 "mercurial_parents",
361 self.hgParentsAct.setWhatsThis(self.tr( 435 )
362 """<b>Show parents</b>""" 436 self.hgParentsAct.setStatusTip(self.tr("Show the parents of the repository"))
363 """<p>This shows the parents of the repository.</p>""" 437 self.hgParentsAct.setWhatsThis(
364 )) 438 self.tr(
439 """<b>Show parents</b>"""
440 """<p>This shows the parents of the repository.</p>"""
441 )
442 )
365 self.hgParentsAct.triggered.connect(self.__hgParents) 443 self.hgParentsAct.triggered.connect(self.__hgParents)
366 self.actions.append(self.hgParentsAct) 444 self.actions.append(self.hgParentsAct)
367 445
368 self.hgTipAct = EricAction( 446 self.hgTipAct = EricAction(
369 self.tr('Show tip'), 447 self.tr("Show tip"), self.tr("Show tip"), 0, 0, self, "mercurial_tip"
370 self.tr('Show tip'), 448 )
371 0, 0, self, 'mercurial_tip') 449 self.hgTipAct.setStatusTip(self.tr("Show the tip of the repository"))
372 self.hgTipAct.setStatusTip(self.tr( 450 self.hgTipAct.setWhatsThis(
373 'Show the tip of the repository' 451 self.tr(
374 )) 452 """<b>Show tip</b>""" """<p>This shows the tip of the repository.</p>"""
375 self.hgTipAct.setWhatsThis(self.tr( 453 )
376 """<b>Show tip</b>""" 454 )
377 """<p>This shows the tip of the repository.</p>"""
378 ))
379 self.hgTipAct.triggered.connect(self.__hgTip) 455 self.hgTipAct.triggered.connect(self.__hgTip)
380 self.actions.append(self.hgTipAct) 456 self.actions.append(self.hgTipAct)
381 457
382 self.vcsRevertAct = EricAction( 458 self.vcsRevertAct = EricAction(
383 self.tr('Revert changes'), 459 self.tr("Revert changes"),
384 UI.PixmapCache.getIcon("vcsRevert"), 460 UI.PixmapCache.getIcon("vcsRevert"),
385 self.tr('Re&vert changes'), 461 self.tr("Re&vert changes"),
386 0, 0, self, 'mercurial_revert') 462 0,
387 self.vcsRevertAct.setStatusTip(self.tr( 463 0,
388 'Revert all changes made to the local project' 464 self,
389 )) 465 "mercurial_revert",
390 self.vcsRevertAct.setWhatsThis(self.tr( 466 )
391 """<b>Revert changes</b>""" 467 self.vcsRevertAct.setStatusTip(
392 """<p>This reverts all changes made to the local project.</p>""" 468 self.tr("Revert all changes made to the local project")
393 )) 469 )
470 self.vcsRevertAct.setWhatsThis(
471 self.tr(
472 """<b>Revert changes</b>"""
473 """<p>This reverts all changes made to the local project.</p>"""
474 )
475 )
394 self.vcsRevertAct.triggered.connect(self.__hgRevert) 476 self.vcsRevertAct.triggered.connect(self.__hgRevert)
395 self.actions.append(self.vcsRevertAct) 477 self.actions.append(self.vcsRevertAct)
396 478
397 self.vcsMergeAct = EricAction( 479 self.vcsMergeAct = EricAction(
398 self.tr('Merge'), 480 self.tr("Merge"),
399 UI.PixmapCache.getIcon("vcsMerge"), 481 UI.PixmapCache.getIcon("vcsMerge"),
400 self.tr('Mer&ge changes...'), 482 self.tr("Mer&ge changes..."),
401 0, 0, self, 'mercurial_merge') 483 0,
402 self.vcsMergeAct.setStatusTip(self.tr( 484 0,
403 'Merge changes of a revision into the local project' 485 self,
404 )) 486 "mercurial_merge",
405 self.vcsMergeAct.setWhatsThis(self.tr( 487 )
406 """<b>Merge</b>""" 488 self.vcsMergeAct.setStatusTip(
407 """<p>This merges changes of a revision into the local""" 489 self.tr("Merge changes of a revision into the local project")
408 """ project.</p>""" 490 )
409 )) 491 self.vcsMergeAct.setWhatsThis(
492 self.tr(
493 """<b>Merge</b>"""
494 """<p>This merges changes of a revision into the local"""
495 """ project.</p>"""
496 )
497 )
410 self.vcsMergeAct.triggered.connect(self._vcsMerge) 498 self.vcsMergeAct.triggered.connect(self._vcsMerge)
411 self.actions.append(self.vcsMergeAct) 499 self.actions.append(self.vcsMergeAct)
412 500
413 self.hgCommitMergeAct = EricAction( 501 self.hgCommitMergeAct = EricAction(
414 self.tr('Commit Merge'), 502 self.tr("Commit Merge"),
415 self.tr('Commit Merge'), 503 self.tr("Commit Merge"),
416 0, 0, self, 'mercurial_commit_merge') 504 0,
417 self.hgCommitMergeAct.setStatusTip(self.tr( 505 0,
418 'Commit all the merged changes.' 506 self,
419 )) 507 "mercurial_commit_merge",
420 self.hgCommitMergeAct.setWhatsThis(self.tr( 508 )
421 """<b>Commit a merge</b>""" 509 self.hgCommitMergeAct.setStatusTip(self.tr("Commit all the merged changes."))
422 """<p>This commits a merge working directory</p>""" 510 self.hgCommitMergeAct.setWhatsThis(
423 )) 511 self.tr(
512 """<b>Commit a merge</b>"""
513 """<p>This commits a merge working directory</p>"""
514 )
515 )
424 self.hgCommitMergeAct.triggered.connect(self.__hgCommitMerge) 516 self.hgCommitMergeAct.triggered.connect(self.__hgCommitMerge)
425 self.actions.append(self.hgCommitMergeAct) 517 self.actions.append(self.hgCommitMergeAct)
426 518
427 self.hgAbortMergeAct = EricAction( 519 self.hgAbortMergeAct = EricAction(
428 self.tr('Abort Merge'), 520 self.tr("Abort Merge"),
429 self.tr('Abort Merge'), 521 self.tr("Abort Merge"),
430 0, 0, self, 'mercurial_cancel_merge') 522 0,
431 self.hgAbortMergeAct.setStatusTip(self.tr( 523 0,
432 'Abort an uncommitted merge and lose all changes' 524 self,
433 )) 525 "mercurial_cancel_merge",
434 self.hgAbortMergeAct.setWhatsThis(self.tr( 526 )
435 """<b>Abort uncommitted merge</b>""" 527 self.hgAbortMergeAct.setStatusTip(
436 """<p>This aborts an uncommitted merge causing all changes""" 528 self.tr("Abort an uncommitted merge and lose all changes")
437 """ to be lost.</p>""" 529 )
438 )) 530 self.hgAbortMergeAct.setWhatsThis(
531 self.tr(
532 """<b>Abort uncommitted merge</b>"""
533 """<p>This aborts an uncommitted merge causing all changes"""
534 """ to be lost.</p>"""
535 )
536 )
439 self.hgAbortMergeAct.triggered.connect(self.__hgAbortMerge) 537 self.hgAbortMergeAct.triggered.connect(self.__hgAbortMerge)
440 self.actions.append(self.hgAbortMergeAct) 538 self.actions.append(self.hgAbortMergeAct)
441 539
442 self.hgReMergeAct = EricAction( 540 self.hgReMergeAct = EricAction(
443 self.tr('Re-Merge'), 541 self.tr("Re-Merge"),
444 UI.PixmapCache.getIcon("vcsMerge"), 542 UI.PixmapCache.getIcon("vcsMerge"),
445 self.tr('Re-Merge'), 543 self.tr("Re-Merge"),
446 0, 0, self, 'mercurial_remerge') 544 0,
447 self.hgReMergeAct.setStatusTip(self.tr( 545 0,
448 'Re-Merge all conflicting, unresolved files of the project' 546 self,
449 )) 547 "mercurial_remerge",
450 self.hgReMergeAct.setWhatsThis(self.tr( 548 )
451 """<b>Re-Merge</b>""" 549 self.hgReMergeAct.setStatusTip(
452 """<p>This re-merges all conflicting, unresolved files of the""" 550 self.tr("Re-Merge all conflicting, unresolved files of the project")
453 """ project discarding any previous merge attempt.</p>""" 551 )
454 )) 552 self.hgReMergeAct.setWhatsThis(
553 self.tr(
554 """<b>Re-Merge</b>"""
555 """<p>This re-merges all conflicting, unresolved files of the"""
556 """ project discarding any previous merge attempt.</p>"""
557 )
558 )
455 self.hgReMergeAct.triggered.connect(self.__hgReMerge) 559 self.hgReMergeAct.triggered.connect(self.__hgReMerge)
456 self.actions.append(self.hgReMergeAct) 560 self.actions.append(self.hgReMergeAct)
457 561
458 self.hgShowConflictsAct = EricAction( 562 self.hgShowConflictsAct = EricAction(
459 self.tr('Show conflicts'), 563 self.tr("Show conflicts"),
460 self.tr('Show conflicts...'), 564 self.tr("Show conflicts..."),
461 0, 0, self, 'mercurial_show_conflicts') 565 0,
462 self.hgShowConflictsAct.setStatusTip(self.tr( 566 0,
463 'Show a dialog listing all files with conflicts' 567 self,
464 )) 568 "mercurial_show_conflicts",
465 self.hgShowConflictsAct.setWhatsThis(self.tr( 569 )
466 """<b>Show conflicts</b>""" 570 self.hgShowConflictsAct.setStatusTip(
467 """<p>This shows a dialog listing all files which had or still""" 571 self.tr("Show a dialog listing all files with conflicts")
468 """ have conflicts.</p>""" 572 )
469 )) 573 self.hgShowConflictsAct.setWhatsThis(
574 self.tr(
575 """<b>Show conflicts</b>"""
576 """<p>This shows a dialog listing all files which had or still"""
577 """ have conflicts.</p>"""
578 )
579 )
470 self.hgShowConflictsAct.triggered.connect(self.__hgShowConflicts) 580 self.hgShowConflictsAct.triggered.connect(self.__hgShowConflicts)
471 self.actions.append(self.hgShowConflictsAct) 581 self.actions.append(self.hgShowConflictsAct)
472 582
473 self.vcsResolveAct = EricAction( 583 self.vcsResolveAct = EricAction(
474 self.tr('Conflicts resolved'), 584 self.tr("Conflicts resolved"),
475 self.tr('Con&flicts resolved'), 585 self.tr("Con&flicts resolved"),
476 0, 0, self, 'mercurial_resolve') 586 0,
477 self.vcsResolveAct.setStatusTip(self.tr( 587 0,
478 'Mark all conflicts of the local project as resolved' 588 self,
479 )) 589 "mercurial_resolve",
480 self.vcsResolveAct.setWhatsThis(self.tr( 590 )
481 """<b>Conflicts resolved</b>""" 591 self.vcsResolveAct.setStatusTip(
482 """<p>This marks all conflicts of the local project as""" 592 self.tr("Mark all conflicts of the local project as resolved")
483 """ resolved.</p>""" 593 )
484 )) 594 self.vcsResolveAct.setWhatsThis(
595 self.tr(
596 """<b>Conflicts resolved</b>"""
597 """<p>This marks all conflicts of the local project as"""
598 """ resolved.</p>"""
599 )
600 )
485 self.vcsResolveAct.triggered.connect(self.__hgResolved) 601 self.vcsResolveAct.triggered.connect(self.__hgResolved)
486 self.actions.append(self.vcsResolveAct) 602 self.actions.append(self.vcsResolveAct)
487 603
488 self.hgUnresolveAct = EricAction( 604 self.hgUnresolveAct = EricAction(
489 self.tr('Conflicts unresolved'), 605 self.tr("Conflicts unresolved"),
490 self.tr('Conflicts unresolved'), 606 self.tr("Conflicts unresolved"),
491 0, 0, self, 'mercurial_unresolve') 607 0,
492 self.hgUnresolveAct.setStatusTip(self.tr( 608 0,
493 'Mark all conflicts of the local project as unresolved' 609 self,
494 )) 610 "mercurial_unresolve",
495 self.hgUnresolveAct.setWhatsThis(self.tr( 611 )
496 """<b>Conflicts unresolved</b>""" 612 self.hgUnresolveAct.setStatusTip(
497 """<p>This marks all conflicts of the local project as""" 613 self.tr("Mark all conflicts of the local project as unresolved")
498 """ unresolved.</p>""" 614 )
499 )) 615 self.hgUnresolveAct.setWhatsThis(
616 self.tr(
617 """<b>Conflicts unresolved</b>"""
618 """<p>This marks all conflicts of the local project as"""
619 """ unresolved.</p>"""
620 )
621 )
500 self.hgUnresolveAct.triggered.connect(self.__hgUnresolved) 622 self.hgUnresolveAct.triggered.connect(self.__hgUnresolved)
501 self.actions.append(self.hgUnresolveAct) 623 self.actions.append(self.hgUnresolveAct)
502 624
503 self.vcsTagAct = EricAction( 625 self.vcsTagAct = EricAction(
504 self.tr('Tag in repository'), 626 self.tr("Tag in repository"),
505 UI.PixmapCache.getIcon("vcsTag"), 627 UI.PixmapCache.getIcon("vcsTag"),
506 self.tr('&Tag in repository...'), 628 self.tr("&Tag in repository..."),
507 0, 0, self, 'mercurial_tag') 629 0,
508 self.vcsTagAct.setStatusTip(self.tr( 630 0,
509 'Tag the local project in the repository' 631 self,
510 )) 632 "mercurial_tag",
511 self.vcsTagAct.setWhatsThis(self.tr( 633 )
512 """<b>Tag in repository</b>""" 634 self.vcsTagAct.setStatusTip(self.tr("Tag the local project in the repository"))
513 """<p>This tags the local project in the repository.</p>""" 635 self.vcsTagAct.setWhatsThis(
514 )) 636 self.tr(
637 """<b>Tag in repository</b>"""
638 """<p>This tags the local project in the repository.</p>"""
639 )
640 )
515 self.vcsTagAct.triggered.connect(self._vcsTag) 641 self.vcsTagAct.triggered.connect(self._vcsTag)
516 self.actions.append(self.vcsTagAct) 642 self.actions.append(self.vcsTagAct)
517 643
518 self.hgTagListAct = EricAction( 644 self.hgTagListAct = EricAction(
519 self.tr('List tags'), 645 self.tr("List tags"),
520 self.tr('List tags...'), 646 self.tr("List tags..."),
521 0, 0, self, 'mercurial_list_tags') 647 0,
522 self.hgTagListAct.setStatusTip(self.tr( 648 0,
523 'List tags of the project' 649 self,
524 )) 650 "mercurial_list_tags",
525 self.hgTagListAct.setWhatsThis(self.tr( 651 )
526 """<b>List tags</b>""" 652 self.hgTagListAct.setStatusTip(self.tr("List tags of the project"))
527 """<p>This lists the tags of the project.</p>""" 653 self.hgTagListAct.setWhatsThis(
528 )) 654 self.tr(
655 """<b>List tags</b>""" """<p>This lists the tags of the project.</p>"""
656 )
657 )
529 self.hgTagListAct.triggered.connect(self.__hgTagList) 658 self.hgTagListAct.triggered.connect(self.__hgTagList)
530 self.actions.append(self.hgTagListAct) 659 self.actions.append(self.hgTagListAct)
531 660
532 self.hgBranchListAct = EricAction( 661 self.hgBranchListAct = EricAction(
533 self.tr('List branches'), 662 self.tr("List branches"),
534 self.tr('List branches...'), 663 self.tr("List branches..."),
535 0, 0, self, 'mercurial_list_branches') 664 0,
536 self.hgBranchListAct.setStatusTip(self.tr( 665 0,
537 'List branches of the project' 666 self,
538 )) 667 "mercurial_list_branches",
539 self.hgBranchListAct.setWhatsThis(self.tr( 668 )
540 """<b>List branches</b>""" 669 self.hgBranchListAct.setStatusTip(self.tr("List branches of the project"))
541 """<p>This lists the branches of the project.</p>""" 670 self.hgBranchListAct.setWhatsThis(
542 )) 671 self.tr(
672 """<b>List branches</b>"""
673 """<p>This lists the branches of the project.</p>"""
674 )
675 )
543 self.hgBranchListAct.triggered.connect(self.__hgBranchList) 676 self.hgBranchListAct.triggered.connect(self.__hgBranchList)
544 self.actions.append(self.hgBranchListAct) 677 self.actions.append(self.hgBranchListAct)
545 678
546 self.hgBranchAct = EricAction( 679 self.hgBranchAct = EricAction(
547 self.tr('Create branch'), 680 self.tr("Create branch"),
548 UI.PixmapCache.getIcon("vcsBranch"), 681 UI.PixmapCache.getIcon("vcsBranch"),
549 self.tr('Create &branch...'), 682 self.tr("Create &branch..."),
550 0, 0, self, 'mercurial_branch') 683 0,
551 self.hgBranchAct.setStatusTip(self.tr( 684 0,
552 'Create a new branch for the local project in the repository' 685 self,
553 )) 686 "mercurial_branch",
554 self.hgBranchAct.setWhatsThis(self.tr( 687 )
555 """<b>Create branch</b>""" 688 self.hgBranchAct.setStatusTip(
556 """<p>This creates a new branch for the local project """ 689 self.tr("Create a new branch for the local project in the repository")
557 """in the repository.</p>""" 690 )
558 )) 691 self.hgBranchAct.setWhatsThis(
692 self.tr(
693 """<b>Create branch</b>"""
694 """<p>This creates a new branch for the local project """
695 """in the repository.</p>"""
696 )
697 )
559 self.hgBranchAct.triggered.connect(self.__hgBranch) 698 self.hgBranchAct.triggered.connect(self.__hgBranch)
560 self.actions.append(self.hgBranchAct) 699 self.actions.append(self.hgBranchAct)
561 700
562 self.hgPushBranchAct = EricAction( 701 self.hgPushBranchAct = EricAction(
563 self.tr('Push new branch'), 702 self.tr("Push new branch"),
564 UI.PixmapCache.getIcon("vcsCommit"), 703 UI.PixmapCache.getIcon("vcsCommit"),
565 self.tr('Push new branch'), 704 self.tr("Push new branch"),
566 0, 0, self, 'mercurial_push_branch') 705 0,
567 self.hgPushBranchAct.setStatusTip(self.tr( 706 0,
568 'Push the current branch of the local project as a new named' 707 self,
569 ' branch' 708 "mercurial_push_branch",
570 )) 709 )
571 self.hgPushBranchAct.setWhatsThis(self.tr( 710 self.hgPushBranchAct.setStatusTip(
572 """<b>Push new branch</b>""" 711 self.tr(
573 """<p>This pushes the current branch of the local project""" 712 "Push the current branch of the local project as a new named" " branch"
574 """ as a new named branch.</p>""" 713 )
575 )) 714 )
715 self.hgPushBranchAct.setWhatsThis(
716 self.tr(
717 """<b>Push new branch</b>"""
718 """<p>This pushes the current branch of the local project"""
719 """ as a new named branch.</p>"""
720 )
721 )
576 self.hgPushBranchAct.triggered.connect(self.__hgPushNewBranch) 722 self.hgPushBranchAct.triggered.connect(self.__hgPushNewBranch)
577 self.actions.append(self.hgPushBranchAct) 723 self.actions.append(self.hgPushBranchAct)
578 724
579 self.hgCloseBranchAct = EricAction( 725 self.hgCloseBranchAct = EricAction(
580 self.tr('Close branch'), 726 self.tr("Close branch"),
581 UI.PixmapCache.getIcon("closehead"), 727 UI.PixmapCache.getIcon("closehead"),
582 self.tr('Close branch'), 728 self.tr("Close branch"),
583 0, 0, self, 'mercurial_close_branch') 729 0,
584 self.hgCloseBranchAct.setStatusTip(self.tr( 730 0,
585 'Close the current branch of the local project' 731 self,
586 )) 732 "mercurial_close_branch",
587 self.hgCloseBranchAct.setWhatsThis(self.tr( 733 )
588 """<b>Close branch</b>""" 734 self.hgCloseBranchAct.setStatusTip(
589 """<p>This closes the current branch of the local project.</p>""" 735 self.tr("Close the current branch of the local project")
590 )) 736 )
737 self.hgCloseBranchAct.setWhatsThis(
738 self.tr(
739 """<b>Close branch</b>"""
740 """<p>This closes the current branch of the local project.</p>"""
741 )
742 )
591 self.hgCloseBranchAct.triggered.connect(self.__hgCloseBranch) 743 self.hgCloseBranchAct.triggered.connect(self.__hgCloseBranch)
592 self.actions.append(self.hgCloseBranchAct) 744 self.actions.append(self.hgCloseBranchAct)
593 745
594 self.hgShowBranchAct = EricAction( 746 self.hgShowBranchAct = EricAction(
595 self.tr('Show current branch'), 747 self.tr("Show current branch"),
596 self.tr('Show current branch'), 748 self.tr("Show current branch"),
597 0, 0, self, 'mercurial_show_branch') 749 0,
598 self.hgShowBranchAct.setStatusTip(self.tr( 750 0,
599 'Show the current branch of the project' 751 self,
600 )) 752 "mercurial_show_branch",
601 self.hgShowBranchAct.setWhatsThis(self.tr( 753 )
602 """<b>Show current branch</b>""" 754 self.hgShowBranchAct.setStatusTip(
603 """<p>This shows the current branch of the project.</p>""" 755 self.tr("Show the current branch of the project")
604 )) 756 )
757 self.hgShowBranchAct.setWhatsThis(
758 self.tr(
759 """<b>Show current branch</b>"""
760 """<p>This shows the current branch of the project.</p>"""
761 )
762 )
605 self.hgShowBranchAct.triggered.connect(self.__hgShowBranch) 763 self.hgShowBranchAct.triggered.connect(self.__hgShowBranch)
606 self.actions.append(self.hgShowBranchAct) 764 self.actions.append(self.hgShowBranchAct)
607 765
608 self.vcsSwitchAct = EricAction( 766 self.vcsSwitchAct = EricAction(
609 self.tr('Switch'), 767 self.tr("Switch"),
610 UI.PixmapCache.getIcon("vcsSwitch"), 768 UI.PixmapCache.getIcon("vcsSwitch"),
611 self.tr('S&witch...'), 769 self.tr("S&witch..."),
612 0, 0, self, 'mercurial_switch') 770 0,
613 self.vcsSwitchAct.setStatusTip(self.tr( 771 0,
614 'Switch the working directory to another revision' 772 self,
615 )) 773 "mercurial_switch",
616 self.vcsSwitchAct.setWhatsThis(self.tr( 774 )
617 """<b>Switch</b>""" 775 self.vcsSwitchAct.setStatusTip(
618 """<p>This switches the working directory to another""" 776 self.tr("Switch the working directory to another revision")
619 """ revision.</p>""" 777 )
620 )) 778 self.vcsSwitchAct.setWhatsThis(
779 self.tr(
780 """<b>Switch</b>"""
781 """<p>This switches the working directory to another"""
782 """ revision.</p>"""
783 )
784 )
621 self.vcsSwitchAct.triggered.connect(self._vcsSwitch) 785 self.vcsSwitchAct.triggered.connect(self._vcsSwitch)
622 self.actions.append(self.vcsSwitchAct) 786 self.actions.append(self.vcsSwitchAct)
623 787
624 self.vcsCleanupAct = EricAction( 788 self.vcsCleanupAct = EricAction(
625 self.tr('Cleanup'), 789 self.tr("Cleanup"), self.tr("Cleanu&p"), 0, 0, self, "mercurial_cleanup"
626 self.tr('Cleanu&p'), 790 )
627 0, 0, self, 'mercurial_cleanup') 791 self.vcsCleanupAct.setStatusTip(self.tr("Cleanup the local project"))
628 self.vcsCleanupAct.setStatusTip(self.tr( 792 self.vcsCleanupAct.setWhatsThis(
629 'Cleanup the local project' 793 self.tr(
630 )) 794 """<b>Cleanup</b>"""
631 self.vcsCleanupAct.setWhatsThis(self.tr( 795 """<p>This performs a cleanup of the local project.</p>"""
632 """<b>Cleanup</b>""" 796 )
633 """<p>This performs a cleanup of the local project.</p>""" 797 )
634 ))
635 self.vcsCleanupAct.triggered.connect(self._vcsCleanup) 798 self.vcsCleanupAct.triggered.connect(self._vcsCleanup)
636 self.actions.append(self.vcsCleanupAct) 799 self.actions.append(self.vcsCleanupAct)
637 800
638 self.vcsCommandAct = EricAction( 801 self.vcsCommandAct = EricAction(
639 self.tr('Execute command'), 802 self.tr("Execute command"),
640 self.tr('E&xecute command...'), 803 self.tr("E&xecute command..."),
641 0, 0, self, 'mercurial_command') 804 0,
642 self.vcsCommandAct.setStatusTip(self.tr( 805 0,
643 'Execute an arbitrary Mercurial command' 806 self,
644 )) 807 "mercurial_command",
645 self.vcsCommandAct.setWhatsThis(self.tr( 808 )
646 """<b>Execute command</b>""" 809 self.vcsCommandAct.setStatusTip(
647 """<p>This opens a dialog to enter an arbitrary Mercurial""" 810 self.tr("Execute an arbitrary Mercurial command")
648 """ command.</p>""" 811 )
649 )) 812 self.vcsCommandAct.setWhatsThis(
813 self.tr(
814 """<b>Execute command</b>"""
815 """<p>This opens a dialog to enter an arbitrary Mercurial"""
816 """ command.</p>"""
817 )
818 )
650 self.vcsCommandAct.triggered.connect(self._vcsCommand) 819 self.vcsCommandAct.triggered.connect(self._vcsCommand)
651 self.actions.append(self.vcsCommandAct) 820 self.actions.append(self.vcsCommandAct)
652 821
653 self.hgConfigAct = EricAction( 822 self.hgConfigAct = EricAction(
654 self.tr('Configure'), 823 self.tr("Configure"),
655 self.tr('Configure...'), 824 self.tr("Configure..."),
656 0, 0, self, 'mercurial_configure') 825 0,
657 self.hgConfigAct.setStatusTip(self.tr( 826 0,
658 'Show the configuration dialog with the Mercurial page selected' 827 self,
659 )) 828 "mercurial_configure",
660 self.hgConfigAct.setWhatsThis(self.tr( 829 )
661 """<b>Configure</b>""" 830 self.hgConfigAct.setStatusTip(
662 """<p>Show the configuration dialog with the Mercurial page""" 831 self.tr("Show the configuration dialog with the Mercurial page selected")
663 """ selected.</p>""" 832 )
664 )) 833 self.hgConfigAct.setWhatsThis(
834 self.tr(
835 """<b>Configure</b>"""
836 """<p>Show the configuration dialog with the Mercurial page"""
837 """ selected.</p>"""
838 )
839 )
665 self.hgConfigAct.triggered.connect(self.__hgConfigure) 840 self.hgConfigAct.triggered.connect(self.__hgConfigure)
666 self.actions.append(self.hgConfigAct) 841 self.actions.append(self.hgConfigAct)
667 842
668 self.hgEditUserConfigAct = EricAction( 843 self.hgEditUserConfigAct = EricAction(
669 self.tr('Edit user configuration'), 844 self.tr("Edit user configuration"),
670 self.tr('Edit user configuration...'), 845 self.tr("Edit user configuration..."),
671 0, 0, self, 'mercurial_user_configure') 846 0,
672 self.hgEditUserConfigAct.setStatusTip(self.tr( 847 0,
673 'Show an editor to edit the user configuration file' 848 self,
674 )) 849 "mercurial_user_configure",
675 self.hgEditUserConfigAct.setWhatsThis(self.tr( 850 )
676 """<b>Edit user configuration</b>""" 851 self.hgEditUserConfigAct.setStatusTip(
677 """<p>Show an editor to edit the user configuration file.</p>""" 852 self.tr("Show an editor to edit the user configuration file")
678 )) 853 )
854 self.hgEditUserConfigAct.setWhatsThis(
855 self.tr(
856 """<b>Edit user configuration</b>"""
857 """<p>Show an editor to edit the user configuration file.</p>"""
858 )
859 )
679 self.hgEditUserConfigAct.triggered.connect(self.__hgEditUserConfig) 860 self.hgEditUserConfigAct.triggered.connect(self.__hgEditUserConfig)
680 self.actions.append(self.hgEditUserConfigAct) 861 self.actions.append(self.hgEditUserConfigAct)
681 862
682 self.hgRepoConfigAct = EricAction( 863 self.hgRepoConfigAct = EricAction(
683 self.tr('Edit repository configuration'), 864 self.tr("Edit repository configuration"),
684 self.tr('Edit repository configuration...'), 865 self.tr("Edit repository configuration..."),
685 0, 0, self, 'mercurial_repo_configure') 866 0,
686 self.hgRepoConfigAct.setStatusTip(self.tr( 867 0,
687 'Show an editor to edit the repository configuration file' 868 self,
688 )) 869 "mercurial_repo_configure",
689 self.hgRepoConfigAct.setWhatsThis(self.tr( 870 )
690 """<b>Edit repository configuration</b>""" 871 self.hgRepoConfigAct.setStatusTip(
691 """<p>Show an editor to edit the repository configuration""" 872 self.tr("Show an editor to edit the repository configuration file")
692 """ file.</p>""" 873 )
693 )) 874 self.hgRepoConfigAct.setWhatsThis(
875 self.tr(
876 """<b>Edit repository configuration</b>"""
877 """<p>Show an editor to edit the repository configuration"""
878 """ file.</p>"""
879 )
880 )
694 self.hgRepoConfigAct.triggered.connect(self.__hgEditRepoConfig) 881 self.hgRepoConfigAct.triggered.connect(self.__hgEditRepoConfig)
695 self.actions.append(self.hgRepoConfigAct) 882 self.actions.append(self.hgRepoConfigAct)
696 883
697 self.hgShowConfigAct = EricAction( 884 self.hgShowConfigAct = EricAction(
698 self.tr('Show combined configuration settings'), 885 self.tr("Show combined configuration settings"),
699 self.tr('Show combined configuration settings...'), 886 self.tr("Show combined configuration settings..."),
700 0, 0, self, 'mercurial_show_config') 887 0,
701 self.hgShowConfigAct.setStatusTip(self.tr( 888 0,
702 'Show the combined configuration settings from all configuration' 889 self,
703 ' files' 890 "mercurial_show_config",
704 )) 891 )
705 self.hgShowConfigAct.setWhatsThis(self.tr( 892 self.hgShowConfigAct.setStatusTip(
706 """<b>Show combined configuration settings</b>""" 893 self.tr(
707 """<p>This shows the combined configuration settings""" 894 "Show the combined configuration settings from all configuration"
708 """ from all configuration files.</p>""" 895 " files"
709 )) 896 )
897 )
898 self.hgShowConfigAct.setWhatsThis(
899 self.tr(
900 """<b>Show combined configuration settings</b>"""
901 """<p>This shows the combined configuration settings"""
902 """ from all configuration files.</p>"""
903 )
904 )
710 self.hgShowConfigAct.triggered.connect(self.__hgShowConfig) 905 self.hgShowConfigAct.triggered.connect(self.__hgShowConfig)
711 self.actions.append(self.hgShowConfigAct) 906 self.actions.append(self.hgShowConfigAct)
712 907
713 self.hgShowPathsAct = EricAction( 908 self.hgShowPathsAct = EricAction(
714 self.tr('Show paths'), 909 self.tr("Show paths"),
715 self.tr('Show paths...'), 910 self.tr("Show paths..."),
716 0, 0, self, 'mercurial_show_paths') 911 0,
717 self.hgShowPathsAct.setStatusTip(self.tr( 912 0,
718 'Show the aliases for remote repositories' 913 self,
719 )) 914 "mercurial_show_paths",
720 self.hgShowPathsAct.setWhatsThis(self.tr( 915 )
721 """<b>Show paths</b>""" 916 self.hgShowPathsAct.setStatusTip(
722 """<p>This shows the aliases for remote repositories.</p>""" 917 self.tr("Show the aliases for remote repositories")
723 )) 918 )
919 self.hgShowPathsAct.setWhatsThis(
920 self.tr(
921 """<b>Show paths</b>"""
922 """<p>This shows the aliases for remote repositories.</p>"""
923 )
924 )
724 self.hgShowPathsAct.triggered.connect(self.__hgShowPaths) 925 self.hgShowPathsAct.triggered.connect(self.__hgShowPaths)
725 self.actions.append(self.hgShowPathsAct) 926 self.actions.append(self.hgShowPathsAct)
726 927
727 self.hgVerifyAct = EricAction( 928 self.hgVerifyAct = EricAction(
728 self.tr('Verify repository'), 929 self.tr("Verify repository"),
729 self.tr('Verify repository...'), 930 self.tr("Verify repository..."),
730 0, 0, self, 'mercurial_verify') 931 0,
731 self.hgVerifyAct.setStatusTip(self.tr( 932 0,
732 'Verify the integrity of the repository' 933 self,
733 )) 934 "mercurial_verify",
734 self.hgVerifyAct.setWhatsThis(self.tr( 935 )
735 """<b>Verify repository</b>""" 936 self.hgVerifyAct.setStatusTip(self.tr("Verify the integrity of the repository"))
736 """<p>This verifies the integrity of the repository.</p>""" 937 self.hgVerifyAct.setWhatsThis(
737 )) 938 self.tr(
939 """<b>Verify repository</b>"""
940 """<p>This verifies the integrity of the repository.</p>"""
941 )
942 )
738 self.hgVerifyAct.triggered.connect(self.__hgVerify) 943 self.hgVerifyAct.triggered.connect(self.__hgVerify)
739 self.actions.append(self.hgVerifyAct) 944 self.actions.append(self.hgVerifyAct)
740 945
741 self.hgRecoverAct = EricAction( 946 self.hgRecoverAct = EricAction(
742 self.tr('Recover'), 947 self.tr("Recover"), self.tr("Recover..."), 0, 0, self, "mercurial_recover"
743 self.tr('Recover...'), 948 )
744 0, 0, self, 'mercurial_recover') 949 self.hgRecoverAct.setStatusTip(
745 self.hgRecoverAct.setStatusTip(self.tr( 950 self.tr("Recover from an interrupted transaction")
746 'Recover from an interrupted transaction' 951 )
747 )) 952 self.hgRecoverAct.setWhatsThis(
748 self.hgRecoverAct.setWhatsThis(self.tr( 953 self.tr(
749 """<b>Recover</b>""" 954 """<b>Recover</b>"""
750 """<p>This recovers from an interrupted transaction.</p>""" 955 """<p>This recovers from an interrupted transaction.</p>"""
751 )) 956 )
957 )
752 self.hgRecoverAct.triggered.connect(self.__hgRecover) 958 self.hgRecoverAct.triggered.connect(self.__hgRecover)
753 self.actions.append(self.hgRecoverAct) 959 self.actions.append(self.hgRecoverAct)
754 960
755 self.hgIdentifyAct = EricAction( 961 self.hgIdentifyAct = EricAction(
756 self.tr('Identify'), 962 self.tr("Identify"),
757 self.tr('Identify...'), 963 self.tr("Identify..."),
758 0, 0, self, 'mercurial_identify') 964 0,
759 self.hgIdentifyAct.setStatusTip(self.tr( 965 0,
760 'Identify the project directory' 966 self,
761 )) 967 "mercurial_identify",
762 self.hgIdentifyAct.setWhatsThis(self.tr( 968 )
763 """<b>Identify</b>""" 969 self.hgIdentifyAct.setStatusTip(self.tr("Identify the project directory"))
764 """<p>This identifies the project directory.</p>""" 970 self.hgIdentifyAct.setWhatsThis(
765 )) 971 self.tr(
972 """<b>Identify</b>"""
973 """<p>This identifies the project directory.</p>"""
974 )
975 )
766 self.hgIdentifyAct.triggered.connect(self.__hgIdentify) 976 self.hgIdentifyAct.triggered.connect(self.__hgIdentify)
767 self.actions.append(self.hgIdentifyAct) 977 self.actions.append(self.hgIdentifyAct)
768 978
769 self.hgCreateIgnoreAct = EricAction( 979 self.hgCreateIgnoreAct = EricAction(
770 self.tr('Create .hgignore'), 980 self.tr("Create .hgignore"),
771 self.tr('Create .hgignore'), 981 self.tr("Create .hgignore"),
772 0, 0, self, 'mercurial_create ignore') 982 0,
773 self.hgCreateIgnoreAct.setStatusTip(self.tr( 983 0,
774 'Create a .hgignore file with default values' 984 self,
775 )) 985 "mercurial_create ignore",
776 self.hgCreateIgnoreAct.setWhatsThis(self.tr( 986 )
777 """<b>Create .hgignore</b>""" 987 self.hgCreateIgnoreAct.setStatusTip(
778 """<p>This creates a .hgignore file with default values.</p>""" 988 self.tr("Create a .hgignore file with default values")
779 )) 989 )
990 self.hgCreateIgnoreAct.setWhatsThis(
991 self.tr(
992 """<b>Create .hgignore</b>"""
993 """<p>This creates a .hgignore file with default values.</p>"""
994 )
995 )
780 self.hgCreateIgnoreAct.triggered.connect(self.__hgCreateIgnore) 996 self.hgCreateIgnoreAct.triggered.connect(self.__hgCreateIgnore)
781 self.actions.append(self.hgCreateIgnoreAct) 997 self.actions.append(self.hgCreateIgnoreAct)
782 998
783 self.hgBundleAct = EricAction( 999 self.hgBundleAct = EricAction(
784 self.tr('Create changegroup'), 1000 self.tr("Create changegroup"),
785 UI.PixmapCache.getIcon("vcsCreateChangegroup"), 1001 UI.PixmapCache.getIcon("vcsCreateChangegroup"),
786 self.tr('Create changegroup...'), 1002 self.tr("Create changegroup..."),
787 0, 0, self, 'mercurial_bundle') 1003 0,
788 self.hgBundleAct.setStatusTip(self.tr( 1004 0,
789 'Create changegroup file collecting changesets' 1005 self,
790 )) 1006 "mercurial_bundle",
791 self.hgBundleAct.setWhatsThis(self.tr( 1007 )
792 """<b>Create changegroup</b>""" 1008 self.hgBundleAct.setStatusTip(
793 """<p>This creates a changegroup file collecting selected""" 1009 self.tr("Create changegroup file collecting changesets")
794 """ changesets (hg bundle).</p>""" 1010 )
795 )) 1011 self.hgBundleAct.setWhatsThis(
1012 self.tr(
1013 """<b>Create changegroup</b>"""
1014 """<p>This creates a changegroup file collecting selected"""
1015 """ changesets (hg bundle).</p>"""
1016 )
1017 )
796 self.hgBundleAct.triggered.connect(self.__hgBundle) 1018 self.hgBundleAct.triggered.connect(self.__hgBundle)
797 self.actions.append(self.hgBundleAct) 1019 self.actions.append(self.hgBundleAct)
798 1020
799 self.hgPreviewBundleAct = EricAction( 1021 self.hgPreviewBundleAct = EricAction(
800 self.tr('Preview changegroup'), 1022 self.tr("Preview changegroup"),
801 UI.PixmapCache.getIcon("vcsPreviewChangegroup"), 1023 UI.PixmapCache.getIcon("vcsPreviewChangegroup"),
802 self.tr('Preview changegroup...'), 1024 self.tr("Preview changegroup..."),
803 0, 0, self, 'mercurial_preview_bundle') 1025 0,
804 self.hgPreviewBundleAct.setStatusTip(self.tr( 1026 0,
805 'Preview a changegroup file containing a collection of changesets' 1027 self,
806 )) 1028 "mercurial_preview_bundle",
807 self.hgPreviewBundleAct.setWhatsThis(self.tr( 1029 )
808 """<b>Preview changegroup</b>""" 1030 self.hgPreviewBundleAct.setStatusTip(
809 """<p>This previews a changegroup file containing a collection""" 1031 self.tr("Preview a changegroup file containing a collection of changesets")
810 """ of changesets.</p>""" 1032 )
811 )) 1033 self.hgPreviewBundleAct.setWhatsThis(
1034 self.tr(
1035 """<b>Preview changegroup</b>"""
1036 """<p>This previews a changegroup file containing a collection"""
1037 """ of changesets.</p>"""
1038 )
1039 )
812 self.hgPreviewBundleAct.triggered.connect(self.__hgPreviewBundle) 1040 self.hgPreviewBundleAct.triggered.connect(self.__hgPreviewBundle)
813 self.actions.append(self.hgPreviewBundleAct) 1041 self.actions.append(self.hgPreviewBundleAct)
814 1042
815 self.hgUnbundleAct = EricAction( 1043 self.hgUnbundleAct = EricAction(
816 self.tr('Apply changegroups'), 1044 self.tr("Apply changegroups"),
817 UI.PixmapCache.getIcon("vcsApplyChangegroup"), 1045 UI.PixmapCache.getIcon("vcsApplyChangegroup"),
818 self.tr('Apply changegroups...'), 1046 self.tr("Apply changegroups..."),
819 0, 0, self, 'mercurial_unbundle') 1047 0,
820 self.hgUnbundleAct.setStatusTip(self.tr( 1048 0,
821 'Apply one or several changegroup files' 1049 self,
822 )) 1050 "mercurial_unbundle",
823 self.hgUnbundleAct.setWhatsThis(self.tr( 1051 )
824 """<b>Apply changegroups</b>""" 1052 self.hgUnbundleAct.setStatusTip(
825 """<p>This applies one or several changegroup files generated by""" 1053 self.tr("Apply one or several changegroup files")
826 """ the 'Create changegroup' action (hg unbundle).</p>""" 1054 )
827 )) 1055 self.hgUnbundleAct.setWhatsThis(
1056 self.tr(
1057 """<b>Apply changegroups</b>"""
1058 """<p>This applies one or several changegroup files generated by"""
1059 """ the 'Create changegroup' action (hg unbundle).</p>"""
1060 )
1061 )
828 self.hgUnbundleAct.triggered.connect(self.__hgUnbundle) 1062 self.hgUnbundleAct.triggered.connect(self.__hgUnbundle)
829 self.actions.append(self.hgUnbundleAct) 1063 self.actions.append(self.hgUnbundleAct)
830 1064
831 self.hgBisectGoodAct = EricAction( 1065 self.hgBisectGoodAct = EricAction(
832 self.tr('Mark as "good"'), 1066 self.tr('Mark as "good"'),
833 self.tr('Mark as "good"...'), 1067 self.tr('Mark as "good"...'),
834 0, 0, self, 'mercurial_bisect_good') 1068 0,
835 self.hgBisectGoodAct.setStatusTip(self.tr( 1069 0,
836 'Mark a selectable changeset as good' 1070 self,
837 )) 1071 "mercurial_bisect_good",
838 self.hgBisectGoodAct.setWhatsThis(self.tr( 1072 )
839 """<b>Mark as good</b>""" 1073 self.hgBisectGoodAct.setStatusTip(
840 """<p>This marks a selectable changeset as good.</p>""" 1074 self.tr("Mark a selectable changeset as good")
841 )) 1075 )
1076 self.hgBisectGoodAct.setWhatsThis(
1077 self.tr(
1078 """<b>Mark as good</b>"""
1079 """<p>This marks a selectable changeset as good.</p>"""
1080 )
1081 )
842 self.hgBisectGoodAct.triggered.connect(self.__hgBisectGood) 1082 self.hgBisectGoodAct.triggered.connect(self.__hgBisectGood)
843 self.actions.append(self.hgBisectGoodAct) 1083 self.actions.append(self.hgBisectGoodAct)
844 1084
845 self.hgBisectBadAct = EricAction( 1085 self.hgBisectBadAct = EricAction(
846 self.tr('Mark as "bad"'), 1086 self.tr('Mark as "bad"'),
847 self.tr('Mark as "bad"...'), 1087 self.tr('Mark as "bad"...'),
848 0, 0, self, 'mercurial_bisect_bad') 1088 0,
849 self.hgBisectBadAct.setStatusTip(self.tr( 1089 0,
850 'Mark a selectable changeset as bad' 1090 self,
851 )) 1091 "mercurial_bisect_bad",
852 self.hgBisectBadAct.setWhatsThis(self.tr( 1092 )
853 """<b>Mark as bad</b>""" 1093 self.hgBisectBadAct.setStatusTip(self.tr("Mark a selectable changeset as bad"))
854 """<p>This marks a selectable changeset as bad.</p>""" 1094 self.hgBisectBadAct.setWhatsThis(
855 )) 1095 self.tr(
1096 """<b>Mark as bad</b>"""
1097 """<p>This marks a selectable changeset as bad.</p>"""
1098 )
1099 )
856 self.hgBisectBadAct.triggered.connect(self.__hgBisectBad) 1100 self.hgBisectBadAct.triggered.connect(self.__hgBisectBad)
857 self.actions.append(self.hgBisectBadAct) 1101 self.actions.append(self.hgBisectBadAct)
858 1102
859 self.hgBisectSkipAct = EricAction( 1103 self.hgBisectSkipAct = EricAction(
860 self.tr('Skip'), 1104 self.tr("Skip"), self.tr("Skip..."), 0, 0, self, "mercurial_bisect_skip"
861 self.tr('Skip...'), 1105 )
862 0, 0, self, 'mercurial_bisect_skip') 1106 self.hgBisectSkipAct.setStatusTip(self.tr("Skip a selectable changeset"))
863 self.hgBisectSkipAct.setStatusTip(self.tr( 1107 self.hgBisectSkipAct.setWhatsThis(
864 'Skip a selectable changeset' 1108 self.tr("""<b>Skip</b>""" """<p>This skips a selectable changeset.</p>""")
865 )) 1109 )
866 self.hgBisectSkipAct.setWhatsThis(self.tr(
867 """<b>Skip</b>"""
868 """<p>This skips a selectable changeset.</p>"""
869 ))
870 self.hgBisectSkipAct.triggered.connect(self.__hgBisectSkip) 1110 self.hgBisectSkipAct.triggered.connect(self.__hgBisectSkip)
871 self.actions.append(self.hgBisectSkipAct) 1111 self.actions.append(self.hgBisectSkipAct)
872 1112
873 self.hgBisectResetAct = EricAction( 1113 self.hgBisectResetAct = EricAction(
874 self.tr('Reset'), 1114 self.tr("Reset"), self.tr("Reset"), 0, 0, self, "mercurial_bisect_reset"
875 self.tr('Reset'), 1115 )
876 0, 0, self, 'mercurial_bisect_reset') 1116 self.hgBisectResetAct.setStatusTip(self.tr("Reset the bisect search data"))
877 self.hgBisectResetAct.setStatusTip(self.tr( 1117 self.hgBisectResetAct.setWhatsThis(
878 'Reset the bisect search data' 1118 self.tr("""<b>Reset</b>""" """<p>This resets the bisect search data.</p>""")
879 )) 1119 )
880 self.hgBisectResetAct.setWhatsThis(self.tr(
881 """<b>Reset</b>"""
882 """<p>This resets the bisect search data.</p>"""
883 ))
884 self.hgBisectResetAct.triggered.connect(self.__hgBisectReset) 1120 self.hgBisectResetAct.triggered.connect(self.__hgBisectReset)
885 self.actions.append(self.hgBisectResetAct) 1121 self.actions.append(self.hgBisectResetAct)
886 1122
887 self.hgBackoutAct = EricAction( 1123 self.hgBackoutAct = EricAction(
888 self.tr('Back out changeset'), 1124 self.tr("Back out changeset"),
889 self.tr('Back out changeset'), 1125 self.tr("Back out changeset"),
890 0, 0, self, 'mercurial_backout') 1126 0,
891 self.hgBackoutAct.setStatusTip(self.tr( 1127 0,
892 'Back out changes of an earlier changeset' 1128 self,
893 )) 1129 "mercurial_backout",
894 self.hgBackoutAct.setWhatsThis(self.tr( 1130 )
895 """<b>Back out changeset</b>""" 1131 self.hgBackoutAct.setStatusTip(
896 """<p>This backs out changes of an earlier changeset.</p>""" 1132 self.tr("Back out changes of an earlier changeset")
897 )) 1133 )
1134 self.hgBackoutAct.setWhatsThis(
1135 self.tr(
1136 """<b>Back out changeset</b>"""
1137 """<p>This backs out changes of an earlier changeset.</p>"""
1138 )
1139 )
898 self.hgBackoutAct.triggered.connect(self.__hgBackout) 1140 self.hgBackoutAct.triggered.connect(self.__hgBackout)
899 self.actions.append(self.hgBackoutAct) 1141 self.actions.append(self.hgBackoutAct)
900 1142
901 self.hgRollbackAct = EricAction( 1143 self.hgRollbackAct = EricAction(
902 self.tr('Rollback last transaction'), 1144 self.tr("Rollback last transaction"),
903 self.tr('Rollback last transaction'), 1145 self.tr("Rollback last transaction"),
904 0, 0, self, 'mercurial_rollback') 1146 0,
905 self.hgRollbackAct.setStatusTip(self.tr( 1147 0,
906 'Rollback the last transaction' 1148 self,
907 )) 1149 "mercurial_rollback",
908 self.hgRollbackAct.setWhatsThis(self.tr( 1150 )
909 """<b>Rollback last transaction</b>""" 1151 self.hgRollbackAct.setStatusTip(self.tr("Rollback the last transaction"))
910 """<p>This performs a rollback of the last transaction.""" 1152 self.hgRollbackAct.setWhatsThis(
911 """ Transactions are used to encapsulate the effects of all""" 1153 self.tr(
912 """ commands that create new changesets or propagate existing""" 1154 """<b>Rollback last transaction</b>"""
913 """ changesets into a repository. For example, the following""" 1155 """<p>This performs a rollback of the last transaction."""
914 """ commands are transactional, and their effects can be""" 1156 """ Transactions are used to encapsulate the effects of all"""
915 """ rolled back:<ul>""" 1157 """ commands that create new changesets or propagate existing"""
916 """<li>commit</li>""" 1158 """ changesets into a repository. For example, the following"""
917 """<li>import</li>""" 1159 """ commands are transactional, and their effects can be"""
918 """<li>pull</li>""" 1160 """ rolled back:<ul>"""
919 """<li>push (with this repository as the destination)</li>""" 1161 """<li>commit</li>"""
920 """<li>unbundle</li>""" 1162 """<li>import</li>"""
921 """</ul>""" 1163 """<li>pull</li>"""
922 """</p><p><strong>This command is dangerous. Please use with""" 1164 """<li>push (with this repository as the destination)</li>"""
923 """ care. </strong></p>""" 1165 """<li>unbundle</li>"""
924 )) 1166 """</ul>"""
1167 """</p><p><strong>This command is dangerous. Please use with"""
1168 """ care. </strong></p>"""
1169 )
1170 )
925 self.hgRollbackAct.triggered.connect(self.__hgRollback) 1171 self.hgRollbackAct.triggered.connect(self.__hgRollback)
926 self.actions.append(self.hgRollbackAct) 1172 self.actions.append(self.hgRollbackAct)
927 1173
928 self.hgServeAct = EricAction( 1174 self.hgServeAct = EricAction(
929 self.tr('Serve project repository'), 1175 self.tr("Serve project repository"),
930 self.tr('Serve project repository...'), 1176 self.tr("Serve project repository..."),
931 0, 0, self, 'mercurial_serve') 1177 0,
932 self.hgServeAct.setStatusTip(self.tr( 1178 0,
933 'Serve the project repository' 1179 self,
934 )) 1180 "mercurial_serve",
935 self.hgServeAct.setWhatsThis(self.tr( 1181 )
936 """<b>Serve project repository</b>""" 1182 self.hgServeAct.setStatusTip(self.tr("Serve the project repository"))
937 """<p>This serves the project repository.</p>""" 1183 self.hgServeAct.setWhatsThis(
938 )) 1184 self.tr(
1185 """<b>Serve project repository</b>"""
1186 """<p>This serves the project repository.</p>"""
1187 )
1188 )
939 self.hgServeAct.triggered.connect(self.__hgServe) 1189 self.hgServeAct.triggered.connect(self.__hgServe)
940 self.actions.append(self.hgServeAct) 1190 self.actions.append(self.hgServeAct)
941 1191
942 self.hgImportAct = EricAction( 1192 self.hgImportAct = EricAction(
943 self.tr('Import Patch'), 1193 self.tr("Import Patch"),
944 UI.PixmapCache.getIcon("vcsImportPatch"), 1194 UI.PixmapCache.getIcon("vcsImportPatch"),
945 self.tr('Import Patch...'), 1195 self.tr("Import Patch..."),
946 0, 0, self, 'mercurial_import') 1196 0,
947 self.hgImportAct.setStatusTip(self.tr( 1197 0,
948 'Import a patch from a patch file' 1198 self,
949 )) 1199 "mercurial_import",
950 self.hgImportAct.setWhatsThis(self.tr( 1200 )
951 """<b>Import Patch</b>""" 1201 self.hgImportAct.setStatusTip(self.tr("Import a patch from a patch file"))
952 """<p>This imports a patch from a patch file into the""" 1202 self.hgImportAct.setWhatsThis(
953 """ project.</p>""" 1203 self.tr(
954 )) 1204 """<b>Import Patch</b>"""
1205 """<p>This imports a patch from a patch file into the"""
1206 """ project.</p>"""
1207 )
1208 )
955 self.hgImportAct.triggered.connect(self.__hgImport) 1209 self.hgImportAct.triggered.connect(self.__hgImport)
956 self.actions.append(self.hgImportAct) 1210 self.actions.append(self.hgImportAct)
957 1211
958 self.hgExportAct = EricAction( 1212 self.hgExportAct = EricAction(
959 self.tr('Export Patches'), 1213 self.tr("Export Patches"),
960 UI.PixmapCache.getIcon("vcsExportPatch"), 1214 UI.PixmapCache.getIcon("vcsExportPatch"),
961 self.tr('Export Patches...'), 1215 self.tr("Export Patches..."),
962 0, 0, self, 'mercurial_export') 1216 0,
963 self.hgExportAct.setStatusTip(self.tr( 1217 0,
964 'Export revisions to patch files' 1218 self,
965 )) 1219 "mercurial_export",
966 self.hgExportAct.setWhatsThis(self.tr( 1220 )
967 """<b>Export Patches</b>""" 1221 self.hgExportAct.setStatusTip(self.tr("Export revisions to patch files"))
968 """<p>This exports revisions of the project to patch files.</p>""" 1222 self.hgExportAct.setWhatsThis(
969 )) 1223 self.tr(
1224 """<b>Export Patches</b>"""
1225 """<p>This exports revisions of the project to patch files.</p>"""
1226 )
1227 )
970 self.hgExportAct.triggered.connect(self.__hgExport) 1228 self.hgExportAct.triggered.connect(self.__hgExport)
971 self.actions.append(self.hgExportAct) 1229 self.actions.append(self.hgExportAct)
972 1230
973 self.hgPhaseAct = EricAction( 1231 self.hgPhaseAct = EricAction(
974 self.tr('Change Phase'), 1232 self.tr("Change Phase"),
975 self.tr('Change Phase...'), 1233 self.tr("Change Phase..."),
976 0, 0, self, 'mercurial_change_phase') 1234 0,
977 self.hgPhaseAct.setStatusTip(self.tr( 1235 0,
978 'Change the phase of revisions' 1236 self,
979 )) 1237 "mercurial_change_phase",
980 self.hgPhaseAct.setWhatsThis(self.tr( 1238 )
981 """<b>Change Phase</b>""" 1239 self.hgPhaseAct.setStatusTip(self.tr("Change the phase of revisions"))
982 """<p>This changes the phase of revisions.</p>""" 1240 self.hgPhaseAct.setWhatsThis(
983 )) 1241 self.tr(
1242 """<b>Change Phase</b>"""
1243 """<p>This changes the phase of revisions.</p>"""
1244 )
1245 )
984 self.hgPhaseAct.triggered.connect(self.__hgPhase) 1246 self.hgPhaseAct.triggered.connect(self.__hgPhase)
985 self.actions.append(self.hgPhaseAct) 1247 self.actions.append(self.hgPhaseAct)
986 1248
987 self.hgGraftAct = EricAction( 1249 self.hgGraftAct = EricAction(
988 self.tr('Copy Changesets'), 1250 self.tr("Copy Changesets"),
989 UI.PixmapCache.getIcon("vcsGraft"), 1251 UI.PixmapCache.getIcon("vcsGraft"),
990 self.tr('Copy Changesets'), 1252 self.tr("Copy Changesets"),
991 0, 0, self, 'mercurial_graft') 1253 0,
992 self.hgGraftAct.setStatusTip(self.tr( 1254 0,
993 'Copies changesets from another branch' 1255 self,
994 )) 1256 "mercurial_graft",
995 self.hgGraftAct.setWhatsThis(self.tr( 1257 )
996 """<b>Copy Changesets</b>""" 1258 self.hgGraftAct.setStatusTip(self.tr("Copies changesets from another branch"))
997 """<p>This copies changesets from another branch on top of the""" 1259 self.hgGraftAct.setWhatsThis(
998 """ current working directory with the user, date and""" 1260 self.tr(
999 """ description of the original changeset.</p>""" 1261 """<b>Copy Changesets</b>"""
1000 )) 1262 """<p>This copies changesets from another branch on top of the"""
1263 """ current working directory with the user, date and"""
1264 """ description of the original changeset.</p>"""
1265 )
1266 )
1001 self.hgGraftAct.triggered.connect(self.__hgGraft) 1267 self.hgGraftAct.triggered.connect(self.__hgGraft)
1002 self.actions.append(self.hgGraftAct) 1268 self.actions.append(self.hgGraftAct)
1003 1269
1004 self.hgGraftContinueAct = EricAction( 1270 self.hgGraftContinueAct = EricAction(
1005 self.tr('Continue Copying Session'), 1271 self.tr("Continue Copying Session"),
1006 self.tr('Continue Copying Session'), 1272 self.tr("Continue Copying Session"),
1007 0, 0, self, 'mercurial_graft_continue') 1273 0,
1008 self.hgGraftContinueAct.setStatusTip(self.tr( 1274 0,
1009 'Continue the last copying session after conflicts were resolved' 1275 self,
1010 )) 1276 "mercurial_graft_continue",
1011 self.hgGraftContinueAct.setWhatsThis(self.tr( 1277 )
1012 """<b>Continue Copying Session</b>""" 1278 self.hgGraftContinueAct.setStatusTip(
1013 """<p>This continues the last copying session after conflicts""" 1279 self.tr("Continue the last copying session after conflicts were resolved")
1014 """ were resolved.</p>""" 1280 )
1015 )) 1281 self.hgGraftContinueAct.setWhatsThis(
1282 self.tr(
1283 """<b>Continue Copying Session</b>"""
1284 """<p>This continues the last copying session after conflicts"""
1285 """ were resolved.</p>"""
1286 )
1287 )
1016 self.hgGraftContinueAct.triggered.connect(self.__hgGraftContinue) 1288 self.hgGraftContinueAct.triggered.connect(self.__hgGraftContinue)
1017 self.actions.append(self.hgGraftContinueAct) 1289 self.actions.append(self.hgGraftContinueAct)
1018 1290
1019 self.hgGraftStopAct = EricAction( 1291 self.hgGraftStopAct = EricAction(
1020 self.tr('Stop Copying Session'), 1292 self.tr("Stop Copying Session"),
1021 self.tr('Stop Copying Session'), 1293 self.tr("Stop Copying Session"),
1022 0, 0, self, 'mercurial_graft_stop') 1294 0,
1023 self.hgGraftStopAct.setStatusTip(self.tr( 1295 0,
1024 'Stop the interrupted copying session' 1296 self,
1025 )) 1297 "mercurial_graft_stop",
1026 self.hgGraftStopAct.setWhatsThis(self.tr( 1298 )
1027 """<b>Stop Copying Session</b>""" 1299 self.hgGraftStopAct.setStatusTip(
1028 """<p>This stops the interrupted copying session.</p>""" 1300 self.tr("Stop the interrupted copying session")
1029 )) 1301 )
1302 self.hgGraftStopAct.setWhatsThis(
1303 self.tr(
1304 """<b>Stop Copying Session</b>"""
1305 """<p>This stops the interrupted copying session.</p>"""
1306 )
1307 )
1030 self.hgGraftStopAct.triggered.connect(self.__hgGraftStop) 1308 self.hgGraftStopAct.triggered.connect(self.__hgGraftStop)
1031 self.actions.append(self.hgGraftStopAct) 1309 self.actions.append(self.hgGraftStopAct)
1032 1310
1033 self.hgGraftAbortAct = EricAction( 1311 self.hgGraftAbortAct = EricAction(
1034 self.tr('Abort Copying Session'), 1312 self.tr("Abort Copying Session"),
1035 self.tr('Abort Copying Session'), 1313 self.tr("Abort Copying Session"),
1036 0, 0, self, 'mercurial_graft_abort') 1314 0,
1037 self.hgGraftAbortAct.setStatusTip(self.tr( 1315 0,
1038 'Abort the interrupted copying session and rollback' 1316 self,
1039 )) 1317 "mercurial_graft_abort",
1040 self.hgGraftAbortAct.setWhatsThis(self.tr( 1318 )
1041 """<b>Abort Copying Session</b>""" 1319 self.hgGraftAbortAct.setStatusTip(
1042 """<p>This aborts the interrupted copying session and""" 1320 self.tr("Abort the interrupted copying session and rollback")
1043 """ rollbacks to the state before the copy.</p>""" 1321 )
1044 )) 1322 self.hgGraftAbortAct.setWhatsThis(
1323 self.tr(
1324 """<b>Abort Copying Session</b>"""
1325 """<p>This aborts the interrupted copying session and"""
1326 """ rollbacks to the state before the copy.</p>"""
1327 )
1328 )
1045 self.hgGraftAbortAct.triggered.connect(self.__hgGraftAbort) 1329 self.hgGraftAbortAct.triggered.connect(self.__hgGraftAbort)
1046 self.actions.append(self.hgGraftAbortAct) 1330 self.actions.append(self.hgGraftAbortAct)
1047 1331
1048 self.hgAddSubrepoAct = EricAction( 1332 self.hgAddSubrepoAct = EricAction(
1049 self.tr('Add'), 1333 self.tr("Add"),
1050 UI.PixmapCache.getIcon("vcsAdd"), 1334 UI.PixmapCache.getIcon("vcsAdd"),
1051 self.tr('Add...'), 1335 self.tr("Add..."),
1052 0, 0, self, 'mercurial_add_subrepo') 1336 0,
1053 self.hgAddSubrepoAct.setStatusTip(self.tr( 1337 0,
1054 'Add a sub-repository' 1338 self,
1055 )) 1339 "mercurial_add_subrepo",
1056 self.hgAddSubrepoAct.setWhatsThis(self.tr( 1340 )
1057 """<b>Add...</b>""" 1341 self.hgAddSubrepoAct.setStatusTip(self.tr("Add a sub-repository"))
1058 """<p>Add a sub-repository to the project.</p>""" 1342 self.hgAddSubrepoAct.setWhatsThis(
1059 )) 1343 self.tr(
1344 """<b>Add...</b>""" """<p>Add a sub-repository to the project.</p>"""
1345 )
1346 )
1060 self.hgAddSubrepoAct.triggered.connect(self.__hgAddSubrepository) 1347 self.hgAddSubrepoAct.triggered.connect(self.__hgAddSubrepository)
1061 self.actions.append(self.hgAddSubrepoAct) 1348 self.actions.append(self.hgAddSubrepoAct)
1062 1349
1063 self.hgRemoveSubreposAct = EricAction( 1350 self.hgRemoveSubreposAct = EricAction(
1064 self.tr('Remove'), 1351 self.tr("Remove"),
1065 UI.PixmapCache.getIcon("vcsRemove"), 1352 UI.PixmapCache.getIcon("vcsRemove"),
1066 self.tr('Remove...'), 1353 self.tr("Remove..."),
1067 0, 0, self, 'mercurial_remove_subrepos') 1354 0,
1068 self.hgRemoveSubreposAct.setStatusTip(self.tr( 1355 0,
1069 'Remove sub-repositories' 1356 self,
1070 )) 1357 "mercurial_remove_subrepos",
1071 self.hgRemoveSubreposAct.setWhatsThis(self.tr( 1358 )
1072 """<b>Remove...</b>""" 1359 self.hgRemoveSubreposAct.setStatusTip(self.tr("Remove sub-repositories"))
1073 """<p>Remove sub-repositories from the project.</p>""" 1360 self.hgRemoveSubreposAct.setWhatsThis(
1074 )) 1361 self.tr(
1075 self.hgRemoveSubreposAct.triggered.connect( 1362 """<b>Remove...</b>"""
1076 self.__hgRemoveSubrepositories) 1363 """<p>Remove sub-repositories from the project.</p>"""
1364 )
1365 )
1366 self.hgRemoveSubreposAct.triggered.connect(self.__hgRemoveSubrepositories)
1077 self.actions.append(self.hgRemoveSubreposAct) 1367 self.actions.append(self.hgRemoveSubreposAct)
1078 1368
1079 self.hgArchiveAct = EricAction( 1369 self.hgArchiveAct = EricAction(
1080 self.tr('Create unversioned archive'), 1370 self.tr("Create unversioned archive"),
1081 UI.PixmapCache.getIcon("vcsExport"), 1371 UI.PixmapCache.getIcon("vcsExport"),
1082 self.tr('Create unversioned archive...'), 1372 self.tr("Create unversioned archive..."),
1083 0, 0, self, 'mercurial_archive') 1373 0,
1084 self.hgArchiveAct.setStatusTip(self.tr( 1374 0,
1085 'Create an unversioned archive from the repository' 1375 self,
1086 )) 1376 "mercurial_archive",
1087 self.hgArchiveAct.setWhatsThis(self.tr( 1377 )
1088 """<b>Create unversioned archive...</b>""" 1378 self.hgArchiveAct.setStatusTip(
1089 """<p>This creates an unversioned archive from the""" 1379 self.tr("Create an unversioned archive from the repository")
1090 """ repository.</p>""" 1380 )
1091 )) 1381 self.hgArchiveAct.setWhatsThis(
1382 self.tr(
1383 """<b>Create unversioned archive...</b>"""
1384 """<p>This creates an unversioned archive from the"""
1385 """ repository.</p>"""
1386 )
1387 )
1092 self.hgArchiveAct.triggered.connect(self.__hgArchive) 1388 self.hgArchiveAct.triggered.connect(self.__hgArchive)
1093 self.actions.append(self.hgArchiveAct) 1389 self.actions.append(self.hgArchiveAct)
1094 1390
1095 self.hgBookmarksListAct = EricAction( 1391 self.hgBookmarksListAct = EricAction(
1096 self.tr('List bookmarks'), 1392 self.tr("List bookmarks"),
1097 UI.PixmapCache.getIcon("listBookmarks"), 1393 UI.PixmapCache.getIcon("listBookmarks"),
1098 self.tr('List bookmarks...'), 1394 self.tr("List bookmarks..."),
1099 0, 0, self, 'mercurial_list_bookmarks') 1395 0,
1100 self.hgBookmarksListAct.setStatusTip(self.tr( 1396 0,
1101 'List bookmarks of the project' 1397 self,
1102 )) 1398 "mercurial_list_bookmarks",
1103 self.hgBookmarksListAct.setWhatsThis(self.tr( 1399 )
1104 """<b>List bookmarks</b>""" 1400 self.hgBookmarksListAct.setStatusTip(self.tr("List bookmarks of the project"))
1105 """<p>This lists the bookmarks of the project.</p>""" 1401 self.hgBookmarksListAct.setWhatsThis(
1106 )) 1402 self.tr(
1403 """<b>List bookmarks</b>"""
1404 """<p>This lists the bookmarks of the project.</p>"""
1405 )
1406 )
1107 self.hgBookmarksListAct.triggered.connect(self.__hgBookmarksList) 1407 self.hgBookmarksListAct.triggered.connect(self.__hgBookmarksList)
1108 self.actions.append(self.hgBookmarksListAct) 1408 self.actions.append(self.hgBookmarksListAct)
1109 1409
1110 self.hgBookmarkDefineAct = EricAction( 1410 self.hgBookmarkDefineAct = EricAction(
1111 self.tr('Define bookmark'), 1411 self.tr("Define bookmark"),
1112 UI.PixmapCache.getIcon("addBookmark"), 1412 UI.PixmapCache.getIcon("addBookmark"),
1113 self.tr('Define bookmark...'), 1413 self.tr("Define bookmark..."),
1114 0, 0, self, 'mercurial_define_bookmark') 1414 0,
1115 self.hgBookmarkDefineAct.setStatusTip(self.tr( 1415 0,
1116 'Define a bookmark for the project' 1416 self,
1117 )) 1417 "mercurial_define_bookmark",
1118 self.hgBookmarkDefineAct.setWhatsThis(self.tr( 1418 )
1119 """<b>Define bookmark</b>""" 1419 self.hgBookmarkDefineAct.setStatusTip(
1120 """<p>This defines a bookmark for the project.</p>""" 1420 self.tr("Define a bookmark for the project")
1121 )) 1421 )
1422 self.hgBookmarkDefineAct.setWhatsThis(
1423 self.tr(
1424 """<b>Define bookmark</b>"""
1425 """<p>This defines a bookmark for the project.</p>"""
1426 )
1427 )
1122 self.hgBookmarkDefineAct.triggered.connect(self.__hgBookmarkDefine) 1428 self.hgBookmarkDefineAct.triggered.connect(self.__hgBookmarkDefine)
1123 self.actions.append(self.hgBookmarkDefineAct) 1429 self.actions.append(self.hgBookmarkDefineAct)
1124 1430
1125 self.hgBookmarkDeleteAct = EricAction( 1431 self.hgBookmarkDeleteAct = EricAction(
1126 self.tr('Delete bookmark'), 1432 self.tr("Delete bookmark"),
1127 UI.PixmapCache.getIcon("deleteBookmark"), 1433 UI.PixmapCache.getIcon("deleteBookmark"),
1128 self.tr('Delete bookmark...'), 1434 self.tr("Delete bookmark..."),
1129 0, 0, self, 'mercurial_delete_bookmark') 1435 0,
1130 self.hgBookmarkDeleteAct.setStatusTip(self.tr( 1436 0,
1131 'Delete a bookmark of the project' 1437 self,
1132 )) 1438 "mercurial_delete_bookmark",
1133 self.hgBookmarkDeleteAct.setWhatsThis(self.tr( 1439 )
1134 """<b>Delete bookmark</b>""" 1440 self.hgBookmarkDeleteAct.setStatusTip(
1135 """<p>This deletes a bookmark of the project.</p>""" 1441 self.tr("Delete a bookmark of the project")
1136 )) 1442 )
1443 self.hgBookmarkDeleteAct.setWhatsThis(
1444 self.tr(
1445 """<b>Delete bookmark</b>"""
1446 """<p>This deletes a bookmark of the project.</p>"""
1447 )
1448 )
1137 self.hgBookmarkDeleteAct.triggered.connect(self.__hgBookmarkDelete) 1449 self.hgBookmarkDeleteAct.triggered.connect(self.__hgBookmarkDelete)
1138 self.actions.append(self.hgBookmarkDeleteAct) 1450 self.actions.append(self.hgBookmarkDeleteAct)
1139 1451
1140 self.hgBookmarkRenameAct = EricAction( 1452 self.hgBookmarkRenameAct = EricAction(
1141 self.tr('Rename bookmark'), 1453 self.tr("Rename bookmark"),
1142 UI.PixmapCache.getIcon("renameBookmark"), 1454 UI.PixmapCache.getIcon("renameBookmark"),
1143 self.tr('Rename bookmark...'), 1455 self.tr("Rename bookmark..."),
1144 0, 0, self, 'mercurial_rename_bookmark') 1456 0,
1145 self.hgBookmarkRenameAct.setStatusTip(self.tr( 1457 0,
1146 'Rename a bookmark of the project' 1458 self,
1147 )) 1459 "mercurial_rename_bookmark",
1148 self.hgBookmarkRenameAct.setWhatsThis(self.tr( 1460 )
1149 """<b>Rename bookmark</b>""" 1461 self.hgBookmarkRenameAct.setStatusTip(
1150 """<p>This renames a bookmark of the project.</p>""" 1462 self.tr("Rename a bookmark of the project")
1151 )) 1463 )
1464 self.hgBookmarkRenameAct.setWhatsThis(
1465 self.tr(
1466 """<b>Rename bookmark</b>"""
1467 """<p>This renames a bookmark of the project.</p>"""
1468 )
1469 )
1152 self.hgBookmarkRenameAct.triggered.connect(self.__hgBookmarkRename) 1470 self.hgBookmarkRenameAct.triggered.connect(self.__hgBookmarkRename)
1153 self.actions.append(self.hgBookmarkRenameAct) 1471 self.actions.append(self.hgBookmarkRenameAct)
1154 1472
1155 self.hgBookmarkMoveAct = EricAction( 1473 self.hgBookmarkMoveAct = EricAction(
1156 self.tr('Move bookmark'), 1474 self.tr("Move bookmark"),
1157 UI.PixmapCache.getIcon("moveBookmark"), 1475 UI.PixmapCache.getIcon("moveBookmark"),
1158 self.tr('Move bookmark...'), 1476 self.tr("Move bookmark..."),
1159 0, 0, self, 'mercurial_move_bookmark') 1477 0,
1160 self.hgBookmarkMoveAct.setStatusTip(self.tr( 1478 0,
1161 'Move a bookmark of the project' 1479 self,
1162 )) 1480 "mercurial_move_bookmark",
1163 self.hgBookmarkMoveAct.setWhatsThis(self.tr( 1481 )
1164 """<b>Move bookmark</b>""" 1482 self.hgBookmarkMoveAct.setStatusTip(self.tr("Move a bookmark of the project"))
1165 """<p>This moves a bookmark of the project to another""" 1483 self.hgBookmarkMoveAct.setWhatsThis(
1166 """ changeset.</p>""" 1484 self.tr(
1167 )) 1485 """<b>Move bookmark</b>"""
1486 """<p>This moves a bookmark of the project to another"""
1487 """ changeset.</p>"""
1488 )
1489 )
1168 self.hgBookmarkMoveAct.triggered.connect(self.__hgBookmarkMove) 1490 self.hgBookmarkMoveAct.triggered.connect(self.__hgBookmarkMove)
1169 self.actions.append(self.hgBookmarkMoveAct) 1491 self.actions.append(self.hgBookmarkMoveAct)
1170 1492
1171 self.hgBookmarkIncomingAct = EricAction( 1493 self.hgBookmarkIncomingAct = EricAction(
1172 self.tr('Show incoming bookmarks'), 1494 self.tr("Show incoming bookmarks"),
1173 UI.PixmapCache.getIcon("incomingBookmark"), 1495 UI.PixmapCache.getIcon("incomingBookmark"),
1174 self.tr('Show incoming bookmarks'), 1496 self.tr("Show incoming bookmarks"),
1175 0, 0, self, 'mercurial_incoming_bookmarks') 1497 0,
1176 self.hgBookmarkIncomingAct.setStatusTip(self.tr( 1498 0,
1177 'Show a list of incoming bookmarks' 1499 self,
1178 )) 1500 "mercurial_incoming_bookmarks",
1179 self.hgBookmarkIncomingAct.setWhatsThis(self.tr( 1501 )
1180 """<b>Show incoming bookmarks</b>""" 1502 self.hgBookmarkIncomingAct.setStatusTip(
1181 """<p>This shows a list of new bookmarks available at the remote""" 1503 self.tr("Show a list of incoming bookmarks")
1182 """ repository.</p>""" 1504 )
1183 )) 1505 self.hgBookmarkIncomingAct.setWhatsThis(
1184 self.hgBookmarkIncomingAct.triggered.connect( 1506 self.tr(
1185 self.__hgBookmarkIncoming) 1507 """<b>Show incoming bookmarks</b>"""
1508 """<p>This shows a list of new bookmarks available at the remote"""
1509 """ repository.</p>"""
1510 )
1511 )
1512 self.hgBookmarkIncomingAct.triggered.connect(self.__hgBookmarkIncoming)
1186 self.actions.append(self.hgBookmarkIncomingAct) 1513 self.actions.append(self.hgBookmarkIncomingAct)
1187 1514
1188 self.hgBookmarkPullAct = EricAction( 1515 self.hgBookmarkPullAct = EricAction(
1189 self.tr('Pull bookmark'), 1516 self.tr("Pull bookmark"),
1190 UI.PixmapCache.getIcon("pullBookmark"), 1517 UI.PixmapCache.getIcon("pullBookmark"),
1191 self.tr('Pull bookmark'), 1518 self.tr("Pull bookmark"),
1192 0, 0, self, 'mercurial_pull_bookmark') 1519 0,
1193 self.hgBookmarkPullAct.setStatusTip(self.tr( 1520 0,
1194 'Pull a bookmark from a remote repository' 1521 self,
1195 )) 1522 "mercurial_pull_bookmark",
1196 self.hgBookmarkPullAct.setWhatsThis(self.tr( 1523 )
1197 """<b>Pull bookmark</b>""" 1524 self.hgBookmarkPullAct.setStatusTip(
1198 """<p>This pulls a bookmark from a remote repository into the """ 1525 self.tr("Pull a bookmark from a remote repository")
1199 """local repository.</p>""" 1526 )
1200 )) 1527 self.hgBookmarkPullAct.setWhatsThis(
1528 self.tr(
1529 """<b>Pull bookmark</b>"""
1530 """<p>This pulls a bookmark from a remote repository into the """
1531 """local repository.</p>"""
1532 )
1533 )
1201 self.hgBookmarkPullAct.triggered.connect(self.__hgBookmarkPull) 1534 self.hgBookmarkPullAct.triggered.connect(self.__hgBookmarkPull)
1202 self.actions.append(self.hgBookmarkPullAct) 1535 self.actions.append(self.hgBookmarkPullAct)
1203 1536
1204 self.hgBookmarkPullCurrentAct = EricAction( 1537 self.hgBookmarkPullCurrentAct = EricAction(
1205 self.tr('Pull current bookmark'), 1538 self.tr("Pull current bookmark"),
1206 UI.PixmapCache.getIcon("pullBookmark"), 1539 UI.PixmapCache.getIcon("pullBookmark"),
1207 self.tr('Pull current bookmark'), 1540 self.tr("Pull current bookmark"),
1208 0, 0, self, 'mercurial_pull_current_bookmark') 1541 0,
1209 self.hgBookmarkPullCurrentAct.setStatusTip(self.tr( 1542 0,
1210 'Pull the current bookmark from a remote repository' 1543 self,
1211 )) 1544 "mercurial_pull_current_bookmark",
1212 self.hgBookmarkPullCurrentAct.setWhatsThis(self.tr( 1545 )
1213 """<b>Pull current bookmark</b>""" 1546 self.hgBookmarkPullCurrentAct.setStatusTip(
1214 """<p>This pulls the current bookmark from a remote""" 1547 self.tr("Pull the current bookmark from a remote repository")
1215 """ repository into the local repository.</p>""" 1548 )
1216 )) 1549 self.hgBookmarkPullCurrentAct.setWhatsThis(
1217 self.hgBookmarkPullCurrentAct.triggered.connect( 1550 self.tr(
1218 self.__hgBookmarkPullCurrent) 1551 """<b>Pull current bookmark</b>"""
1219 1552 """<p>This pulls the current bookmark from a remote"""
1553 """ repository into the local repository.</p>"""
1554 )
1555 )
1556 self.hgBookmarkPullCurrentAct.triggered.connect(self.__hgBookmarkPullCurrent)
1557
1220 self.hgBookmarkOutgoingAct = EricAction( 1558 self.hgBookmarkOutgoingAct = EricAction(
1221 self.tr('Show outgoing bookmarks'), 1559 self.tr("Show outgoing bookmarks"),
1222 UI.PixmapCache.getIcon("outgoingBookmark"), 1560 UI.PixmapCache.getIcon("outgoingBookmark"),
1223 self.tr('Show outgoing bookmarks'), 1561 self.tr("Show outgoing bookmarks"),
1224 0, 0, self, 'mercurial_outgoing_bookmarks') 1562 0,
1225 self.hgBookmarkOutgoingAct.setStatusTip(self.tr( 1563 0,
1226 'Show a list of outgoing bookmarks' 1564 self,
1227 )) 1565 "mercurial_outgoing_bookmarks",
1228 self.hgBookmarkOutgoingAct.setWhatsThis(self.tr( 1566 )
1229 """<b>Show outgoing bookmarks</b>""" 1567 self.hgBookmarkOutgoingAct.setStatusTip(
1230 """<p>This shows a list of new bookmarks available at the local""" 1568 self.tr("Show a list of outgoing bookmarks")
1231 """ repository.</p>""" 1569 )
1232 )) 1570 self.hgBookmarkOutgoingAct.setWhatsThis(
1233 self.hgBookmarkOutgoingAct.triggered.connect( 1571 self.tr(
1234 self.__hgBookmarkOutgoing) 1572 """<b>Show outgoing bookmarks</b>"""
1573 """<p>This shows a list of new bookmarks available at the local"""
1574 """ repository.</p>"""
1575 )
1576 )
1577 self.hgBookmarkOutgoingAct.triggered.connect(self.__hgBookmarkOutgoing)
1235 self.actions.append(self.hgBookmarkOutgoingAct) 1578 self.actions.append(self.hgBookmarkOutgoingAct)
1236 1579
1237 self.hgBookmarkPushAct = EricAction( 1580 self.hgBookmarkPushAct = EricAction(
1238 self.tr('Push bookmark'), 1581 self.tr("Push bookmark"),
1239 UI.PixmapCache.getIcon("pushBookmark"), 1582 UI.PixmapCache.getIcon("pushBookmark"),
1240 self.tr('Push bookmark'), 1583 self.tr("Push bookmark"),
1241 0, 0, self, 'mercurial_push_bookmark') 1584 0,
1242 self.hgBookmarkPushAct.setStatusTip(self.tr( 1585 0,
1243 'Push a bookmark to a remote repository' 1586 self,
1244 )) 1587 "mercurial_push_bookmark",
1245 self.hgBookmarkPushAct.setWhatsThis(self.tr( 1588 )
1246 """<b>Push bookmark</b>""" 1589 self.hgBookmarkPushAct.setStatusTip(
1247 """<p>This pushes a bookmark from the local repository to a """ 1590 self.tr("Push a bookmark to a remote repository")
1248 """remote repository.</p>""" 1591 )
1249 )) 1592 self.hgBookmarkPushAct.setWhatsThis(
1593 self.tr(
1594 """<b>Push bookmark</b>"""
1595 """<p>This pushes a bookmark from the local repository to a """
1596 """remote repository.</p>"""
1597 )
1598 )
1250 self.hgBookmarkPushAct.triggered.connect(self.__hgBookmarkPush) 1599 self.hgBookmarkPushAct.triggered.connect(self.__hgBookmarkPush)
1251 self.actions.append(self.hgBookmarkPushAct) 1600 self.actions.append(self.hgBookmarkPushAct)
1252 1601
1253 self.hgBookmarkPushCurrentAct = EricAction( 1602 self.hgBookmarkPushCurrentAct = EricAction(
1254 self.tr('Push current bookmark'), 1603 self.tr("Push current bookmark"),
1255 UI.PixmapCache.getIcon("pushBookmark"), 1604 UI.PixmapCache.getIcon("pushBookmark"),
1256 self.tr('Push current bookmark'), 1605 self.tr("Push current bookmark"),
1257 0, 0, self, 'mercurial_push_current_bookmark') 1606 0,
1258 self.hgBookmarkPushCurrentAct.setStatusTip(self.tr( 1607 0,
1259 'Push the current bookmark to a remote repository' 1608 self,
1260 )) 1609 "mercurial_push_current_bookmark",
1261 self.hgBookmarkPushCurrentAct.setWhatsThis(self.tr( 1610 )
1262 """<b>Push current bookmark</b>""" 1611 self.hgBookmarkPushCurrentAct.setStatusTip(
1263 """<p>This pushes the current bookmark from the local""" 1612 self.tr("Push the current bookmark to a remote repository")
1264 """ repository to a remote repository.</p>""" 1613 )
1265 )) 1614 self.hgBookmarkPushCurrentAct.setWhatsThis(
1266 self.hgBookmarkPushCurrentAct.triggered.connect( 1615 self.tr(
1267 self.__hgBookmarkPushCurrent) 1616 """<b>Push current bookmark</b>"""
1617 """<p>This pushes the current bookmark from the local"""
1618 """ repository to a remote repository.</p>"""
1619 )
1620 )
1621 self.hgBookmarkPushCurrentAct.triggered.connect(self.__hgBookmarkPushCurrent)
1268 self.actions.append(self.hgBookmarkPushCurrentAct) 1622 self.actions.append(self.hgBookmarkPushCurrentAct)
1269 1623
1270 self.hgBookmarkPushAllAct = EricAction( 1624 self.hgBookmarkPushAllAct = EricAction(
1271 self.tr('Push all bookmarks'), 1625 self.tr("Push all bookmarks"),
1272 UI.PixmapCache.getIcon("pushBookmark"), 1626 UI.PixmapCache.getIcon("pushBookmark"),
1273 self.tr('Push all bookmarks'), 1627 self.tr("Push all bookmarks"),
1274 0, 0, self, 'mercurial_push_all_bookmarks') 1628 0,
1275 self.hgBookmarkPushAllAct.setStatusTip(self.tr( 1629 0,
1276 'Push all bookmarks to a remote repository' 1630 self,
1277 )) 1631 "mercurial_push_all_bookmarks",
1278 self.hgBookmarkPushAllAct.setWhatsThis(self.tr( 1632 )
1279 """<b>Push all bookmarks</b>""" 1633 self.hgBookmarkPushAllAct.setStatusTip(
1280 """<p>This pushes all bookmark from the local""" 1634 self.tr("Push all bookmarks to a remote repository")
1281 """ repository to a remote repository.</p>""" 1635 )
1282 )) 1636 self.hgBookmarkPushAllAct.setWhatsThis(
1283 self.hgBookmarkPushAllAct.triggered.connect( 1637 self.tr(
1284 self.__hgBookmarkPushAll) 1638 """<b>Push all bookmarks</b>"""
1285 1639 """<p>This pushes all bookmark from the local"""
1640 """ repository to a remote repository.</p>"""
1641 )
1642 )
1643 self.hgBookmarkPushAllAct.triggered.connect(self.__hgBookmarkPushAll)
1644
1286 self.hgDeleteBackupsAct = EricAction( 1645 self.hgDeleteBackupsAct = EricAction(
1287 self.tr('Delete all backups'), 1646 self.tr("Delete all backups"),
1288 UI.PixmapCache.getIcon("clearPrivateData"), 1647 UI.PixmapCache.getIcon("clearPrivateData"),
1289 self.tr('Delete all backups'), 1648 self.tr("Delete all backups"),
1290 0, 0, self, 'mercurial_delete_all_backups') 1649 0,
1291 self.hgDeleteBackupsAct.setStatusTip(self.tr( 1650 0,
1292 'Delete all backup bundles stored in the backup area' 1651 self,
1293 )) 1652 "mercurial_delete_all_backups",
1294 self.hgDeleteBackupsAct.setWhatsThis(self.tr( 1653 )
1295 """<b>Delete all backups</b>""" 1654 self.hgDeleteBackupsAct.setStatusTip(
1296 """<p>This deletes all backup bundles stored in the backup""" 1655 self.tr("Delete all backup bundles stored in the backup area")
1297 """ area of the repository.</p>""" 1656 )
1298 )) 1657 self.hgDeleteBackupsAct.setWhatsThis(
1299 self.hgDeleteBackupsAct.triggered.connect( 1658 self.tr(
1300 self.__hgDeleteBackups) 1659 """<b>Delete all backups</b>"""
1660 """<p>This deletes all backup bundles stored in the backup"""
1661 """ area of the repository.</p>"""
1662 )
1663 )
1664 self.hgDeleteBackupsAct.triggered.connect(self.__hgDeleteBackups)
1301 self.actions.append(self.hgDeleteBackupsAct) 1665 self.actions.append(self.hgDeleteBackupsAct)
1302 1666
1303 def __checkActions(self): 1667 def __checkActions(self):
1304 """ 1668 """
1305 Private slot to set the enabled status of actions. 1669 Private slot to set the enabled status of actions.
1306 """ 1670 """
1307 self.hgPullAct.setEnabled(self.vcs.canPull()) 1671 self.hgPullAct.setEnabled(self.vcs.canPull())
1308 self.hgIncomingAct.setEnabled(self.vcs.canPull()) 1672 self.hgIncomingAct.setEnabled(self.vcs.canPull())
1309 self.hgBookmarkPullAct.setEnabled(self.vcs.canPull()) 1673 self.hgBookmarkPullAct.setEnabled(self.vcs.canPull())
1310 self.hgBookmarkIncomingAct.setEnabled(self.vcs.canPull()) 1674 self.hgBookmarkIncomingAct.setEnabled(self.vcs.canPull())
1311 self.hgBookmarkPullCurrentAct.setEnabled(self.vcs.canPull()) 1675 self.hgBookmarkPullCurrentAct.setEnabled(self.vcs.canPull())
1312 1676
1313 self.hgPushAct.setEnabled(self.vcs.canPush()) 1677 self.hgPushAct.setEnabled(self.vcs.canPush())
1314 self.hgPushBranchAct.setEnabled(self.vcs.canPush()) 1678 self.hgPushBranchAct.setEnabled(self.vcs.canPush())
1315 self.hgPushForcedAct.setEnabled(self.vcs.canPush()) 1679 self.hgPushForcedAct.setEnabled(self.vcs.canPush())
1316 self.hgOutgoingAct.setEnabled(self.vcs.canPush()) 1680 self.hgOutgoingAct.setEnabled(self.vcs.canPush())
1317 self.hgBookmarkPushAct.setEnabled(self.vcs.canPush()) 1681 self.hgBookmarkPushAct.setEnabled(self.vcs.canPush())
1318 self.hgBookmarkOutgoingAct.setEnabled(self.vcs.canPush()) 1682 self.hgBookmarkOutgoingAct.setEnabled(self.vcs.canPush())
1319 self.hgBookmarkPushCurrentAct.setEnabled(self.vcs.canPush()) 1683 self.hgBookmarkPushCurrentAct.setEnabled(self.vcs.canPush())
1320 if self.vcs.version >= (5, 7): 1684 if self.vcs.version >= (5, 7):
1321 self.hgBookmarkPushAllAct.setEnabled(self.vcs.canPush()) 1685 self.hgBookmarkPushAllAct.setEnabled(self.vcs.canPush())
1322 1686
1323 self.hgCommitMergeAct.setEnabled(self.vcs.canCommitMerge()) 1687 self.hgCommitMergeAct.setEnabled(self.vcs.canCommitMerge())
1324 1688
1325 def initMenu(self, menu): 1689 def initMenu(self, menu):
1326 """ 1690 """
1327 Public method to generate the VCS menu. 1691 Public method to generate the VCS menu.
1328 1692
1329 @param menu reference to the menu to be populated (QMenu) 1693 @param menu reference to the menu to be populated (QMenu)
1330 """ 1694 """
1331 menu.clear() 1695 menu.clear()
1332 1696
1333 self.subMenus = [] 1697 self.subMenus = []
1334 1698
1335 adminMenu = QMenu(self.tr("Administration"), menu) 1699 adminMenu = QMenu(self.tr("Administration"), menu)
1336 adminMenu.setTearOffEnabled(True) 1700 adminMenu.setTearOffEnabled(True)
1337 adminMenu.addAction(self.hgHeadsAct) 1701 adminMenu.addAction(self.hgHeadsAct)
1338 adminMenu.addAction(self.hgParentsAct) 1702 adminMenu.addAction(self.hgParentsAct)
1339 adminMenu.addAction(self.hgTipAct) 1703 adminMenu.addAction(self.hgTipAct)
1354 adminMenu.addSeparator() 1718 adminMenu.addSeparator()
1355 adminMenu.addAction(self.hgVerifyAct) 1719 adminMenu.addAction(self.hgVerifyAct)
1356 adminMenu.addSeparator() 1720 adminMenu.addSeparator()
1357 adminMenu.addAction(self.hgDeleteBackupsAct) 1721 adminMenu.addAction(self.hgDeleteBackupsAct)
1358 self.subMenus.append(adminMenu) 1722 self.subMenus.append(adminMenu)
1359 1723
1360 specialsMenu = QMenu(self.tr("Specials"), menu) 1724 specialsMenu = QMenu(self.tr("Specials"), menu)
1361 specialsMenu.setTearOffEnabled(True) 1725 specialsMenu.setTearOffEnabled(True)
1362 specialsMenu.addAction(self.hgArchiveAct) 1726 specialsMenu.addAction(self.hgArchiveAct)
1363 specialsMenu.addSeparator() 1727 specialsMenu.addSeparator()
1364 specialsMenu.addAction(self.hgPushForcedAct) 1728 specialsMenu.addAction(self.hgPushForcedAct)
1365 specialsMenu.addSeparator() 1729 specialsMenu.addSeparator()
1366 specialsMenu.addAction(self.hgServeAct) 1730 specialsMenu.addAction(self.hgServeAct)
1367 self.subMenus.append(specialsMenu) 1731 self.subMenus.append(specialsMenu)
1368 1732
1369 bundleMenu = QMenu(self.tr("Changegroup Management"), menu) 1733 bundleMenu = QMenu(self.tr("Changegroup Management"), menu)
1370 bundleMenu.setTearOffEnabled(True) 1734 bundleMenu.setTearOffEnabled(True)
1371 bundleMenu.addAction(self.hgBundleAct) 1735 bundleMenu.addAction(self.hgBundleAct)
1372 bundleMenu.addAction(self.hgPreviewBundleAct) 1736 bundleMenu.addAction(self.hgPreviewBundleAct)
1373 bundleMenu.addAction(self.hgUnbundleAct) 1737 bundleMenu.addAction(self.hgUnbundleAct)
1374 self.subMenus.append(bundleMenu) 1738 self.subMenus.append(bundleMenu)
1375 1739
1376 patchMenu = QMenu(self.tr("Patch Management"), menu) 1740 patchMenu = QMenu(self.tr("Patch Management"), menu)
1377 patchMenu.setTearOffEnabled(True) 1741 patchMenu.setTearOffEnabled(True)
1378 patchMenu.addAction(self.hgImportAct) 1742 patchMenu.addAction(self.hgImportAct)
1379 patchMenu.addAction(self.hgExportAct) 1743 patchMenu.addAction(self.hgExportAct)
1380 self.subMenus.append(patchMenu) 1744 self.subMenus.append(patchMenu)
1381 1745
1382 bisectMenu = QMenu(self.tr("Bisect"), menu) 1746 bisectMenu = QMenu(self.tr("Bisect"), menu)
1383 bisectMenu.setTearOffEnabled(True) 1747 bisectMenu.setTearOffEnabled(True)
1384 bisectMenu.addAction(self.hgBisectGoodAct) 1748 bisectMenu.addAction(self.hgBisectGoodAct)
1385 bisectMenu.addAction(self.hgBisectBadAct) 1749 bisectMenu.addAction(self.hgBisectBadAct)
1386 bisectMenu.addAction(self.hgBisectSkipAct) 1750 bisectMenu.addAction(self.hgBisectSkipAct)
1387 bisectMenu.addAction(self.hgBisectResetAct) 1751 bisectMenu.addAction(self.hgBisectResetAct)
1388 self.subMenus.append(bisectMenu) 1752 self.subMenus.append(bisectMenu)
1389 1753
1390 tagsMenu = QMenu(self.tr("Tags"), menu) 1754 tagsMenu = QMenu(self.tr("Tags"), menu)
1391 tagsMenu.setIcon(UI.PixmapCache.getIcon("vcsTag")) 1755 tagsMenu.setIcon(UI.PixmapCache.getIcon("vcsTag"))
1392 tagsMenu.setTearOffEnabled(True) 1756 tagsMenu.setTearOffEnabled(True)
1393 tagsMenu.addAction(self.vcsTagAct) 1757 tagsMenu.addAction(self.vcsTagAct)
1394 tagsMenu.addAction(self.hgTagListAct) 1758 tagsMenu.addAction(self.hgTagListAct)
1395 self.subMenus.append(tagsMenu) 1759 self.subMenus.append(tagsMenu)
1396 1760
1397 branchesMenu = QMenu(self.tr("Branches"), menu) 1761 branchesMenu = QMenu(self.tr("Branches"), menu)
1398 branchesMenu.setIcon(UI.PixmapCache.getIcon("vcsBranch")) 1762 branchesMenu.setIcon(UI.PixmapCache.getIcon("vcsBranch"))
1399 branchesMenu.setTearOffEnabled(True) 1763 branchesMenu.setTearOffEnabled(True)
1400 branchesMenu.addAction(self.hgBranchAct) 1764 branchesMenu.addAction(self.hgBranchAct)
1401 branchesMenu.addAction(self.hgPushBranchAct) 1765 branchesMenu.addAction(self.hgPushBranchAct)
1402 branchesMenu.addAction(self.hgCloseBranchAct) 1766 branchesMenu.addAction(self.hgCloseBranchAct)
1403 branchesMenu.addAction(self.hgBranchListAct) 1767 branchesMenu.addAction(self.hgBranchListAct)
1404 self.subMenus.append(branchesMenu) 1768 self.subMenus.append(branchesMenu)
1405 1769
1406 bookmarksMenu = QMenu(self.tr("Bookmarks"), menu) 1770 bookmarksMenu = QMenu(self.tr("Bookmarks"), menu)
1407 bookmarksMenu.setIcon(UI.PixmapCache.getIcon("bookmark22")) 1771 bookmarksMenu.setIcon(UI.PixmapCache.getIcon("bookmark22"))
1408 bookmarksMenu.setTearOffEnabled(True) 1772 bookmarksMenu.setTearOffEnabled(True)
1409 bookmarksMenu.addAction(self.hgBookmarkDefineAct) 1773 bookmarksMenu.addAction(self.hgBookmarkDefineAct)
1410 bookmarksMenu.addAction(self.hgBookmarkDeleteAct) 1774 bookmarksMenu.addAction(self.hgBookmarkDeleteAct)
1421 bookmarksMenu.addAction(self.hgBookmarkPushAct) 1785 bookmarksMenu.addAction(self.hgBookmarkPushAct)
1422 bookmarksMenu.addAction(self.hgBookmarkPushCurrentAct) 1786 bookmarksMenu.addAction(self.hgBookmarkPushCurrentAct)
1423 if self.vcs.version >= (5, 7): 1787 if self.vcs.version >= (5, 7):
1424 bookmarksMenu.addAction(self.hgBookmarkPushAllAct) 1788 bookmarksMenu.addAction(self.hgBookmarkPushAllAct)
1425 self.subMenus.append(bookmarksMenu) 1789 self.subMenus.append(bookmarksMenu)
1426 1790
1427 self.__extensionsMenu = QMenu(self.tr("Extensions"), menu) 1791 self.__extensionsMenu = QMenu(self.tr("Extensions"), menu)
1428 self.__extensionsMenu.setTearOffEnabled(True) 1792 self.__extensionsMenu.setTearOffEnabled(True)
1429 self.__extensionsMenu.aboutToShow.connect(self.__showExtensionMenu) 1793 self.__extensionsMenu.aboutToShow.connect(self.__showExtensionMenu)
1430 self.__extensionMenus = {} 1794 self.__extensionMenus = {}
1431 for extensionMenuTitle in sorted(self.__extensionMenuTitles): 1795 for extensionMenuTitle in sorted(self.__extensionMenuTitles):
1432 extensionName = self.__extensionMenuTitles[extensionMenuTitle] 1796 extensionName = self.__extensionMenuTitles[extensionMenuTitle]
1433 extensionMenu = self.__extensions[extensionName].initMenu( 1797 extensionMenu = self.__extensions[extensionName].initMenu(
1434 self.__extensionsMenu) 1798 self.__extensionsMenu
1799 )
1435 self.__extensionMenus[extensionName] = extensionMenu 1800 self.__extensionMenus[extensionName] = extensionMenu
1436 self.__extensionsMenu.addMenu(extensionMenu) 1801 self.__extensionsMenu.addMenu(extensionMenu)
1437 self.vcs.activeExtensionsChanged.connect(self.__showExtensionMenu) 1802 self.vcs.activeExtensionsChanged.connect(self.__showExtensionMenu)
1438 1803
1439 graftMenu = QMenu(self.tr("Copy Changesets"), menu) 1804 graftMenu = QMenu(self.tr("Copy Changesets"), menu)
1440 graftMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft")) 1805 graftMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft"))
1441 graftMenu.setTearOffEnabled(True) 1806 graftMenu.setTearOffEnabled(True)
1442 graftMenu.addAction(self.hgGraftAct) 1807 graftMenu.addAction(self.hgGraftAct)
1443 graftMenu.addAction(self.hgGraftContinueAct) 1808 graftMenu.addAction(self.hgGraftContinueAct)
1444 if self.vcs.version >= (4, 7, 0): 1809 if self.vcs.version >= (4, 7, 0):
1445 graftMenu.addAction(self.hgGraftStopAct) 1810 graftMenu.addAction(self.hgGraftStopAct)
1446 graftMenu.addAction(self.hgGraftAbortAct) 1811 graftMenu.addAction(self.hgGraftAbortAct)
1447 1812
1448 subrepoMenu = QMenu(self.tr("Sub-Repository"), menu) 1813 subrepoMenu = QMenu(self.tr("Sub-Repository"), menu)
1449 subrepoMenu.setTearOffEnabled(True) 1814 subrepoMenu.setTearOffEnabled(True)
1450 subrepoMenu.addAction(self.hgAddSubrepoAct) 1815 subrepoMenu.addAction(self.hgAddSubrepoAct)
1451 subrepoMenu.addAction(self.hgRemoveSubreposAct) 1816 subrepoMenu.addAction(self.hgRemoveSubreposAct)
1452 1817
1453 mergeMenu = QMenu(self.tr("Merge Changesets"), menu) 1818 mergeMenu = QMenu(self.tr("Merge Changesets"), menu)
1454 mergeMenu.setIcon(UI.PixmapCache.getIcon("vcsMerge")) 1819 mergeMenu.setIcon(UI.PixmapCache.getIcon("vcsMerge"))
1455 mergeMenu.setTearOffEnabled(True) 1820 mergeMenu.setTearOffEnabled(True)
1456 mergeMenu.addAction(self.vcsMergeAct) 1821 mergeMenu.addAction(self.vcsMergeAct)
1457 mergeMenu.addAction(self.hgShowConflictsAct) 1822 mergeMenu.addAction(self.hgShowConflictsAct)
1458 mergeMenu.addAction(self.vcsResolveAct) 1823 mergeMenu.addAction(self.vcsResolveAct)
1459 mergeMenu.addAction(self.hgUnresolveAct) 1824 mergeMenu.addAction(self.hgUnresolveAct)
1460 mergeMenu.addAction(self.hgReMergeAct) 1825 mergeMenu.addAction(self.hgReMergeAct)
1461 mergeMenu.addAction(self.hgCommitMergeAct) 1826 mergeMenu.addAction(self.hgCommitMergeAct)
1462 mergeMenu.addAction(self.hgAbortMergeAct) 1827 mergeMenu.addAction(self.hgAbortMergeAct)
1463 1828
1464 act = menu.addAction( 1829 act = menu.addAction(
1465 UI.PixmapCache.getIcon( 1830 UI.PixmapCache.getIcon(
1466 os.path.join("VcsPlugins", "vcsMercurial", "icons", 1831 os.path.join("VcsPlugins", "vcsMercurial", "icons", "mercurial.svg")
1467 "mercurial.svg")), 1832 ),
1468 self.vcs.vcsName(), self._vcsInfoDisplay) 1833 self.vcs.vcsName(),
1834 self._vcsInfoDisplay,
1835 )
1469 font = act.font() 1836 font = act.font()
1470 font.setBold(True) 1837 font.setBold(True)
1471 act.setFont(font) 1838 act.setFont(font)
1472 menu.addSeparator() 1839 menu.addSeparator()
1473 1840
1474 menu.addAction(self.hgIncomingAct) 1841 menu.addAction(self.hgIncomingAct)
1475 menu.addAction(self.hgPullAct) 1842 menu.addAction(self.hgPullAct)
1476 menu.addAction(self.vcsUpdateAct) 1843 menu.addAction(self.vcsUpdateAct)
1477 menu.addSeparator() 1844 menu.addSeparator()
1478 menu.addAction(self.vcsCommitAct) 1845 menu.addAction(self.vcsCommitAct)
1517 menu.addAction(self.hgEditUserConfigAct) 1884 menu.addAction(self.hgEditUserConfigAct)
1518 menu.addAction(self.hgConfigAct) 1885 menu.addAction(self.hgConfigAct)
1519 menu.addSeparator() 1886 menu.addSeparator()
1520 menu.addAction(self.vcsNewAct) 1887 menu.addAction(self.vcsNewAct)
1521 menu.addAction(self.vcsExportAct) 1888 menu.addAction(self.vcsExportAct)
1522 1889
1523 def initToolbar(self, ui, toolbarManager): 1890 def initToolbar(self, ui, toolbarManager):
1524 """ 1891 """
1525 Public slot to initialize the VCS toolbar. 1892 Public slot to initialize the VCS toolbar.
1526 1893
1527 @param ui reference to the main window (UserInterface) 1894 @param ui reference to the main window (UserInterface)
1528 @param toolbarManager reference to a toolbar manager object 1895 @param toolbarManager reference to a toolbar manager object
1529 (EricToolBarManager) 1896 (EricToolBarManager)
1530 """ 1897 """
1531 self.__toolbarManager = toolbarManager 1898 self.__toolbarManager = toolbarManager
1532 1899
1533 self.__toolbar = QToolBar(self.tr("Mercurial"), ui) 1900 self.__toolbar = QToolBar(self.tr("Mercurial"), ui)
1534 self.__toolbar.setIconSize(UI.Config.ToolBarIconSize) 1901 self.__toolbar.setIconSize(UI.Config.ToolBarIconSize)
1535 self.__toolbar.setObjectName("MercurialToolbar") 1902 self.__toolbar.setObjectName("MercurialToolbar")
1536 self.__toolbar.setToolTip(self.tr('Mercurial')) 1903 self.__toolbar.setToolTip(self.tr("Mercurial"))
1537 1904
1538 self.__toolbar.addAction(self.hgLogBrowserAct) 1905 self.__toolbar.addAction(self.hgLogBrowserAct)
1539 self.__toolbar.addAction(self.vcsStatusAct) 1906 self.__toolbar.addAction(self.vcsStatusAct)
1540 self.__toolbar.addSeparator() 1907 self.__toolbar.addSeparator()
1541 self.__toolbar.addAction(self.vcsDiffAct) 1908 self.__toolbar.addAction(self.vcsDiffAct)
1542 self.__toolbar.addSeparator() 1909 self.__toolbar.addSeparator()
1543 self.__toolbar.addAction(self.vcsNewAct) 1910 self.__toolbar.addAction(self.vcsNewAct)
1544 self.__toolbar.addAction(self.vcsExportAct) 1911 self.__toolbar.addAction(self.vcsExportAct)
1545 self.__toolbar.addSeparator() 1912 self.__toolbar.addSeparator()
1546 1913
1547 title = self.__toolbar.windowTitle() 1914 title = self.__toolbar.windowTitle()
1548 toolbarManager.addToolBar(self.__toolbar, title) 1915 toolbarManager.addToolBar(self.__toolbar, title)
1549 toolbarManager.addAction(self.hgIncomingAct, title) 1916 toolbarManager.addAction(self.hgIncomingAct, title)
1550 toolbarManager.addAction(self.hgPullAct, title) 1917 toolbarManager.addAction(self.hgPullAct, title)
1551 toolbarManager.addAction(self.vcsUpdateAct, title) 1918 toolbarManager.addAction(self.vcsUpdateAct, title)
1581 toolbarManager.addAction(self.hgExportAct, title) 1948 toolbarManager.addAction(self.hgExportAct, title)
1582 toolbarManager.addAction(self.hgBundleAct, title) 1949 toolbarManager.addAction(self.hgBundleAct, title)
1583 toolbarManager.addAction(self.hgPreviewBundleAct, title) 1950 toolbarManager.addAction(self.hgPreviewBundleAct, title)
1584 toolbarManager.addAction(self.hgUnbundleAct, title) 1951 toolbarManager.addAction(self.hgUnbundleAct, title)
1585 toolbarManager.addAction(self.hgDeleteBackupsAct, title) 1952 toolbarManager.addAction(self.hgDeleteBackupsAct, title)
1586 1953
1587 self.__toolbar.setEnabled(False) 1954 self.__toolbar.setEnabled(False)
1588 self.__toolbar.setVisible(False) 1955 self.__toolbar.setVisible(False)
1589 1956
1590 ui.registerToolbar("mercurial", self.__toolbar.windowTitle(), 1957 ui.registerToolbar(
1591 self.__toolbar, "vcs") 1958 "mercurial", self.__toolbar.windowTitle(), self.__toolbar, "vcs"
1959 )
1592 ui.addToolBar(self.__toolbar) 1960 ui.addToolBar(self.__toolbar)
1593 1961
1594 def removeToolbar(self, ui, toolbarManager): 1962 def removeToolbar(self, ui, toolbarManager):
1595 """ 1963 """
1596 Public method to remove a toolbar created by initToolbar(). 1964 Public method to remove a toolbar created by initToolbar().
1597 1965
1598 @param ui reference to the main window (UserInterface) 1966 @param ui reference to the main window (UserInterface)
1599 @param toolbarManager reference to a toolbar manager object 1967 @param toolbarManager reference to a toolbar manager object
1600 (EricToolBarManager) 1968 (EricToolBarManager)
1601 """ 1969 """
1602 ui.removeToolBar(self.__toolbar) 1970 ui.removeToolBar(self.__toolbar)
1603 ui.unregisterToolbar("mercurial") 1971 ui.unregisterToolbar("mercurial")
1604 1972
1605 title = self.__toolbar.windowTitle() 1973 title = self.__toolbar.windowTitle()
1606 toolbarManager.removeCategoryActions(title) 1974 toolbarManager.removeCategoryActions(title)
1607 toolbarManager.removeToolBar(self.__toolbar) 1975 toolbarManager.removeToolBar(self.__toolbar)
1608 1976
1609 self.__toolbar.deleteLater() 1977 self.__toolbar.deleteLater()
1610 self.__toolbar = None 1978 self.__toolbar = None
1611 1979
1612 def showMenu(self): 1980 def showMenu(self):
1613 """ 1981 """
1614 Public slot called before the vcs menu is shown. 1982 Public slot called before the vcs menu is shown.
1615 """ 1983 """
1616 super().showMenu() 1984 super().showMenu()
1617 1985
1618 self.__checkActions() 1986 self.__checkActions()
1619 1987
1620 def shutdown(self): 1988 def shutdown(self):
1621 """ 1989 """
1622 Public method to perform shutdown actions. 1990 Public method to perform shutdown actions.
1623 """ 1991 """
1624 self.vcs.activeExtensionsChanged.disconnect(self.__showExtensionMenu) 1992 self.vcs.activeExtensionsChanged.disconnect(self.__showExtensionMenu)
1625 self.vcs.iniFileChanged.disconnect(self.__checkActions) 1993 self.vcs.iniFileChanged.disconnect(self.__checkActions)
1626 1994
1627 # close torn off sub menus 1995 # close torn off sub menus
1628 for menu in self.subMenus: 1996 for menu in self.subMenus:
1629 if menu.isTearOffMenuVisible(): 1997 if menu.isTearOffMenuVisible():
1630 menu.hideTearOffMenu() 1998 menu.hideTearOffMenu()
1631 1999
1632 # close torn off extension menus 2000 # close torn off extension menus
1633 for extensionName in self.__extensionMenus: 2001 for extensionName in self.__extensionMenus:
1634 self.__extensions[extensionName].shutdown() 2002 self.__extensions[extensionName].shutdown()
1635 menu = self.__extensionMenus[extensionName] 2003 menu = self.__extensionMenus[extensionName]
1636 if menu.isTearOffMenuVisible(): 2004 if menu.isTearOffMenuVisible():
1637 menu.hideTearOffMenu() 2005 menu.hideTearOffMenu()
1638 2006
1639 if self.__extensionsMenu.isTearOffMenuVisible(): 2007 if self.__extensionsMenu.isTearOffMenuVisible():
1640 self.__extensionsMenu.hideTearOffMenu() 2008 self.__extensionsMenu.hideTearOffMenu()
1641 2009
1642 def __showExtensionMenu(self): 2010 def __showExtensionMenu(self):
1643 """ 2011 """
1644 Private slot showing the extensions menu. 2012 Private slot showing the extensions menu.
1645 """ 2013 """
1646 for extensionName in self.__extensionMenus: 2014 for extensionName in self.__extensionMenus:
1647 extensionMenu = self.__extensionMenus[extensionName] 2015 extensionMenu = self.__extensionMenus[extensionName]
1648 extensionMenu.menuAction().setEnabled( 2016 extensionMenu.menuAction().setEnabled(
1649 self.vcs.isExtensionActive(extensionName)) 2017 self.vcs.isExtensionActive(extensionName)
2018 )
1650 if ( 2019 if (
1651 not extensionMenu.menuAction().isEnabled() and 2020 not extensionMenu.menuAction().isEnabled()
1652 extensionMenu.isTearOffMenuVisible() 2021 and extensionMenu.isTearOffMenuVisible()
1653 ): 2022 ):
1654 extensionMenu.hideTearOffMenu() 2023 extensionMenu.hideTearOffMenu()
1655 2024
1656 def __hgExtendedDiff(self): 2025 def __hgExtendedDiff(self):
1657 """ 2026 """
1658 Private slot used to perform a hg diff with the selection of revisions. 2027 Private slot used to perform a hg diff with the selection of revisions.
1659 """ 2028 """
1660 self.vcs.hgExtendedDiff(self.project.ppath) 2029 self.vcs.hgExtendedDiff(self.project.ppath)
1661 2030
1662 def __hgIncoming(self): 2031 def __hgIncoming(self):
1663 """ 2032 """
1664 Private slot used to show the log of changes coming into the 2033 Private slot used to show the log of changes coming into the
1665 repository. 2034 repository.
1666 """ 2035 """
1667 self.vcs.hgIncoming() 2036 self.vcs.hgIncoming()
1668 2037
1669 def __hgOutgoing(self): 2038 def __hgOutgoing(self):
1670 """ 2039 """
1671 Private slot used to show the log of changes going out of the 2040 Private slot used to show the log of changes going out of the
1672 repository. 2041 repository.
1673 """ 2042 """
1674 self.vcs.hgOutgoing() 2043 self.vcs.hgOutgoing()
1675 2044
1676 def __hgPull(self): 2045 def __hgPull(self):
1677 """ 2046 """
1678 Private slot used to pull changes from a remote repository. 2047 Private slot used to pull changes from a remote repository.
1679 """ 2048 """
1680 shouldReopen = self.vcs.hgPull() 2049 shouldReopen = self.vcs.hgPull()
1681 if shouldReopen: 2050 if shouldReopen:
1682 res = EricMessageBox.yesNo( 2051 res = EricMessageBox.yesNo(
1683 self.parent(), 2052 self.parent(),
1684 self.tr("Pull"), 2053 self.tr("Pull"),
1685 self.tr("""The project should be reread. Do this now?"""), 2054 self.tr("""The project should be reread. Do this now?"""),
1686 yesDefault=True) 2055 yesDefault=True,
2056 )
1687 if res: 2057 if res:
1688 self.project.reopenProject() 2058 self.project.reopenProject()
1689 2059
1690 def __hgPush(self): 2060 def __hgPush(self):
1691 """ 2061 """
1692 Private slot used to push changes to a remote repository. 2062 Private slot used to push changes to a remote repository.
1693 """ 2063 """
1694 self.vcs.hgPush() 2064 self.vcs.hgPush()
1695 2065
1696 def __hgPushForced(self): 2066 def __hgPushForced(self):
1697 """ 2067 """
1698 Private slot used to push changes to a remote repository using 2068 Private slot used to push changes to a remote repository using
1699 the force option. 2069 the force option.
1700 """ 2070 """
1701 self.vcs.hgPush(force=True) 2071 self.vcs.hgPush(force=True)
1702 2072
1703 def __hgHeads(self): 2073 def __hgHeads(self):
1704 """ 2074 """
1705 Private slot used to show the heads of the repository. 2075 Private slot used to show the heads of the repository.
1706 """ 2076 """
1707 self.vcs.hgInfo(mode="heads") 2077 self.vcs.hgInfo(mode="heads")
1708 2078
1709 def __hgParents(self): 2079 def __hgParents(self):
1710 """ 2080 """
1711 Private slot used to show the parents of the repository. 2081 Private slot used to show the parents of the repository.
1712 """ 2082 """
1713 self.vcs.hgInfo(mode="parents") 2083 self.vcs.hgInfo(mode="parents")
1714 2084
1715 def __hgTip(self): 2085 def __hgTip(self):
1716 """ 2086 """
1717 Private slot used to show the tip of the repository. 2087 Private slot used to show the tip of the repository.
1718 """ 2088 """
1719 self.vcs.hgInfo(mode="tip") 2089 self.vcs.hgInfo(mode="tip")
1720 2090
1721 def __hgResolved(self): 2091 def __hgResolved(self):
1722 """ 2092 """
1723 Private slot used to mark conflicts of the local project as being 2093 Private slot used to mark conflicts of the local project as being
1724 resolved. 2094 resolved.
1725 """ 2095 """
1726 self.vcs.vcsResolved(self.project.ppath) 2096 self.vcs.vcsResolved(self.project.ppath)
1727 2097
1728 def __hgUnresolved(self): 2098 def __hgUnresolved(self):
1729 """ 2099 """
1730 Private slot used to mark conflicts of the local project as being 2100 Private slot used to mark conflicts of the local project as being
1731 unresolved. 2101 unresolved.
1732 """ 2102 """
1734 2104
1735 def __hgCommitMerge(self): 2105 def __hgCommitMerge(self):
1736 """ 2106 """
1737 Private slot used to commit a merge. 2107 Private slot used to commit a merge.
1738 """ 2108 """
1739 self.vcs.vcsCommit(self.project.ppath, self.tr('Merge'), merge=True) 2109 self.vcs.vcsCommit(self.project.ppath, self.tr("Merge"), merge=True)
1740 2110
1741 def __hgAbortMerge(self): 2111 def __hgAbortMerge(self):
1742 """ 2112 """
1743 Private slot used to abort an uncommitted merge. 2113 Private slot used to abort an uncommitted merge.
1744 """ 2114 """
1745 self.vcs.hgAbortMerge() 2115 self.vcs.hgAbortMerge()
1746 2116
1747 def __hgShowConflicts(self): 2117 def __hgShowConflicts(self):
1748 """ 2118 """
1749 Private slot used to list all files with conflicts. 2119 Private slot used to list all files with conflicts.
1750 """ 2120 """
1751 self.vcs.hgConflicts() 2121 self.vcs.hgConflicts()
1752 2122
1753 def __hgReMerge(self): 2123 def __hgReMerge(self):
1754 """ 2124 """
1755 Private slot used to list all files with conflicts. 2125 Private slot used to list all files with conflicts.
1756 """ 2126 """
1757 self.vcs.hgReMerge(self.project.ppath) 2127 self.vcs.hgReMerge(self.project.ppath)
1758 2128
1759 def __hgTagList(self): 2129 def __hgTagList(self):
1760 """ 2130 """
1761 Private slot used to list the tags of the project. 2131 Private slot used to list the tags of the project.
1762 """ 2132 """
1763 self.vcs.hgListTagBranch(True) 2133 self.vcs.hgListTagBranch(True)
1764 2134
1765 def __hgBranchList(self): 2135 def __hgBranchList(self):
1766 """ 2136 """
1767 Private slot used to list the branches of the project. 2137 Private slot used to list the branches of the project.
1768 """ 2138 """
1769 self.vcs.hgListTagBranch(False) 2139 self.vcs.hgListTagBranch(False)
1770 2140
1771 def __hgBranch(self): 2141 def __hgBranch(self):
1772 """ 2142 """
1773 Private slot used to create a new branch for the project. 2143 Private slot used to create a new branch for the project.
1774 """ 2144 """
1775 self.vcs.hgBranch() 2145 self.vcs.hgBranch()
1776 2146
1777 def __hgShowBranch(self): 2147 def __hgShowBranch(self):
1778 """ 2148 """
1779 Private slot used to show the current branch for the project. 2149 Private slot used to show the current branch for the project.
1780 """ 2150 """
1781 self.vcs.hgShowBranch() 2151 self.vcs.hgShowBranch()
1782 2152
1783 def __hgConfigure(self): 2153 def __hgConfigure(self):
1784 """ 2154 """
1785 Private method to open the configuration dialog. 2155 Private method to open the configuration dialog.
1786 """ 2156 """
1787 ericApp().getObject("UserInterface").showPreferences( 2157 ericApp().getObject("UserInterface").showPreferences("zzz_mercurialPage")
1788 "zzz_mercurialPage") 2158
1789
1790 def __hgCloseBranch(self): 2159 def __hgCloseBranch(self):
1791 """ 2160 """
1792 Private slot used to close the current branch of the local project. 2161 Private slot used to close the current branch of the local project.
1793 """ 2162 """
1794 if Preferences.getVCS("AutoSaveProject"): 2163 if Preferences.getVCS("AutoSaveProject"):
1795 self.project.saveProject() 2164 self.project.saveProject()
1796 if Preferences.getVCS("AutoSaveFiles"): 2165 if Preferences.getVCS("AutoSaveFiles"):
1797 self.project.saveAllScripts() 2166 self.project.saveAllScripts()
1798 self.vcs.vcsCommit(self.project.ppath, '', closeBranch=True) 2167 self.vcs.vcsCommit(self.project.ppath, "", closeBranch=True)
1799 2168
1800 def __hgPushNewBranch(self): 2169 def __hgPushNewBranch(self):
1801 """ 2170 """
1802 Private slot to push a new named branch. 2171 Private slot to push a new named branch.
1803 """ 2172 """
1804 self.vcs.hgPush(newBranch=True) 2173 self.vcs.hgPush(newBranch=True)
1805 2174
1806 def __hgEditUserConfig(self): 2175 def __hgEditUserConfig(self):
1807 """ 2176 """
1808 Private slot used to edit the user configuration file. 2177 Private slot used to edit the user configuration file.
1809 """ 2178 """
1810 self.vcs.hgEditUserConfig() 2179 self.vcs.hgEditUserConfig()
1811 2180
1812 def __hgEditRepoConfig(self): 2181 def __hgEditRepoConfig(self):
1813 """ 2182 """
1814 Private slot used to edit the repository configuration file. 2183 Private slot used to edit the repository configuration file.
1815 """ 2184 """
1816 self.vcs.hgEditConfig() 2185 self.vcs.hgEditConfig()
1817 2186
1818 def __hgShowConfig(self): 2187 def __hgShowConfig(self):
1819 """ 2188 """
1820 Private slot used to show the combined configuration. 2189 Private slot used to show the combined configuration.
1821 """ 2190 """
1822 self.vcs.hgShowConfig() 2191 self.vcs.hgShowConfig()
1823 2192
1824 def __hgVerify(self): 2193 def __hgVerify(self):
1825 """ 2194 """
1826 Private slot used to verify the integrity of the repository. 2195 Private slot used to verify the integrity of the repository.
1827 """ 2196 """
1828 self.vcs.hgVerify() 2197 self.vcs.hgVerify()
1829 2198
1830 def __hgShowPaths(self): 2199 def __hgShowPaths(self):
1831 """ 2200 """
1832 Private slot used to show the aliases for remote repositories. 2201 Private slot used to show the aliases for remote repositories.
1833 """ 2202 """
1834 self.vcs.hgShowPaths() 2203 self.vcs.hgShowPaths()
1835 2204
1836 def __hgRecover(self): 2205 def __hgRecover(self):
1837 """ 2206 """
1838 Private slot used to recover from an interrupted transaction. 2207 Private slot used to recover from an interrupted transaction.
1839 """ 2208 """
1840 self.vcs.hgRecover() 2209 self.vcs.hgRecover()
1841 2210
1842 def __hgIdentify(self): 2211 def __hgIdentify(self):
1843 """ 2212 """
1844 Private slot used to identify the project directory. 2213 Private slot used to identify the project directory.
1845 """ 2214 """
1846 self.vcs.hgIdentify() 2215 self.vcs.hgIdentify()
1847 2216
1848 def __hgCreateIgnore(self): 2217 def __hgCreateIgnore(self):
1849 """ 2218 """
1850 Private slot used to create a .hgignore file for the project. 2219 Private slot used to create a .hgignore file for the project.
1851 """ 2220 """
1852 self.vcs.hgCreateIgnoreFile(self.project.ppath, autoAdd=True) 2221 self.vcs.hgCreateIgnoreFile(self.project.ppath, autoAdd=True)
1853 2222
1854 def __hgBundle(self): 2223 def __hgBundle(self):
1855 """ 2224 """
1856 Private slot used to create a changegroup file. 2225 Private slot used to create a changegroup file.
1857 """ 2226 """
1858 self.vcs.hgBundle() 2227 self.vcs.hgBundle()
1859 2228
1860 def __hgPreviewBundle(self): 2229 def __hgPreviewBundle(self):
1861 """ 2230 """
1862 Private slot used to preview a changegroup file. 2231 Private slot used to preview a changegroup file.
1863 """ 2232 """
1864 self.vcs.hgPreviewBundle() 2233 self.vcs.hgPreviewBundle()
1865 2234
1866 def __hgUnbundle(self): 2235 def __hgUnbundle(self):
1867 """ 2236 """
1868 Private slot used to apply changegroup files. 2237 Private slot used to apply changegroup files.
1869 """ 2238 """
1870 shouldReopen = self.vcs.hgUnbundle() 2239 shouldReopen = self.vcs.hgUnbundle()
1871 if shouldReopen: 2240 if shouldReopen:
1872 res = EricMessageBox.yesNo( 2241 res = EricMessageBox.yesNo(
1873 self.parent(), 2242 self.parent(),
1874 self.tr("Apply changegroups"), 2243 self.tr("Apply changegroups"),
1875 self.tr("""The project should be reread. Do this now?"""), 2244 self.tr("""The project should be reread. Do this now?"""),
1876 yesDefault=True) 2245 yesDefault=True,
2246 )
1877 if res: 2247 if res:
1878 self.project.reopenProject() 2248 self.project.reopenProject()
1879 2249
1880 def __hgBisectGood(self): 2250 def __hgBisectGood(self):
1881 """ 2251 """
1882 Private slot used to execute the bisect --good command. 2252 Private slot used to execute the bisect --good command.
1883 """ 2253 """
1884 self.vcs.hgBisect("good") 2254 self.vcs.hgBisect("good")
1885 2255
1886 def __hgBisectBad(self): 2256 def __hgBisectBad(self):
1887 """ 2257 """
1888 Private slot used to execute the bisect --bad command. 2258 Private slot used to execute the bisect --bad command.
1889 """ 2259 """
1890 self.vcs.hgBisect("bad") 2260 self.vcs.hgBisect("bad")
1891 2261
1892 def __hgBisectSkip(self): 2262 def __hgBisectSkip(self):
1893 """ 2263 """
1894 Private slot used to execute the bisect --skip command. 2264 Private slot used to execute the bisect --skip command.
1895 """ 2265 """
1896 self.vcs.hgBisect("skip") 2266 self.vcs.hgBisect("skip")
1897 2267
1898 def __hgBisectReset(self): 2268 def __hgBisectReset(self):
1899 """ 2269 """
1900 Private slot used to execute the bisect --reset command. 2270 Private slot used to execute the bisect --reset command.
1901 """ 2271 """
1902 self.vcs.hgBisect("reset") 2272 self.vcs.hgBisect("reset")
1903 2273
1904 def __hgBackout(self): 2274 def __hgBackout(self):
1905 """ 2275 """
1906 Private slot used to back out changes of a changeset. 2276 Private slot used to back out changes of a changeset.
1907 """ 2277 """
1908 self.vcs.hgBackout() 2278 self.vcs.hgBackout()
1909 2279
1910 def __hgRollback(self): 2280 def __hgRollback(self):
1911 """ 2281 """
1912 Private slot used to rollback the last transaction. 2282 Private slot used to rollback the last transaction.
1913 """ 2283 """
1914 self.vcs.hgRollback() 2284 self.vcs.hgRollback()
1915 2285
1916 def __hgServe(self): 2286 def __hgServe(self):
1917 """ 2287 """
1918 Private slot used to serve the project. 2288 Private slot used to serve the project.
1919 """ 2289 """
1920 self.vcs.hgServe(self.project.ppath) 2290 self.vcs.hgServe(self.project.ppath)
1921 2291
1922 def __hgImport(self): 2292 def __hgImport(self):
1923 """ 2293 """
1924 Private slot used to import a patch file. 2294 Private slot used to import a patch file.
1925 """ 2295 """
1926 shouldReopen = self.vcs.hgImport() 2296 shouldReopen = self.vcs.hgImport()
1927 if shouldReopen: 2297 if shouldReopen:
1928 res = EricMessageBox.yesNo( 2298 res = EricMessageBox.yesNo(
1929 self.parent(), 2299 self.parent(),
1930 self.tr("Import Patch"), 2300 self.tr("Import Patch"),
1931 self.tr("""The project should be reread. Do this now?"""), 2301 self.tr("""The project should be reread. Do this now?"""),
1932 yesDefault=True) 2302 yesDefault=True,
2303 )
1933 if res: 2304 if res:
1934 self.project.reopenProject() 2305 self.project.reopenProject()
1935 2306
1936 def __hgExport(self): 2307 def __hgExport(self):
1937 """ 2308 """
1938 Private slot used to export revisions to patch files. 2309 Private slot used to export revisions to patch files.
1939 """ 2310 """
1940 self.vcs.hgExport() 2311 self.vcs.hgExport()
1941 2312
1942 def __hgRevert(self): 2313 def __hgRevert(self):
1943 """ 2314 """
1944 Private slot used to revert changes made to the local project. 2315 Private slot used to revert changes made to the local project.
1945 """ 2316 """
1946 shouldReopen = self.vcs.vcsRevert(self.project.ppath) 2317 shouldReopen = self.vcs.vcsRevert(self.project.ppath)
1947 if shouldReopen: 2318 if shouldReopen:
1948 res = EricMessageBox.yesNo( 2319 res = EricMessageBox.yesNo(
1949 self.parent(), 2320 self.parent(),
1950 self.tr("Revert Changes"), 2321 self.tr("Revert Changes"),
1951 self.tr("""The project should be reread. Do this now?"""), 2322 self.tr("""The project should be reread. Do this now?"""),
1952 yesDefault=True) 2323 yesDefault=True,
2324 )
1953 if res: 2325 if res:
1954 self.project.reopenProject() 2326 self.project.reopenProject()
1955 2327
1956 def __hgPhase(self): 2328 def __hgPhase(self):
1957 """ 2329 """
1958 Private slot used to change the phase of revisions. 2330 Private slot used to change the phase of revisions.
1959 """ 2331 """
1960 self.vcs.hgPhase() 2332 self.vcs.hgPhase()
1961 2333
1962 def __hgGraft(self): 2334 def __hgGraft(self):
1963 """ 2335 """
1964 Private slot used to copy changesets from another branch. 2336 Private slot used to copy changesets from another branch.
1965 """ 2337 """
1966 shouldReopen = self.vcs.hgGraft() 2338 shouldReopen = self.vcs.hgGraft()
1967 if shouldReopen: 2339 if shouldReopen:
1968 res = EricMessageBox.yesNo( 2340 res = EricMessageBox.yesNo(
1969 None, 2341 None,
1970 self.tr("Copy Changesets"), 2342 self.tr("Copy Changesets"),
1971 self.tr("""The project should be reread. Do this now?"""), 2343 self.tr("""The project should be reread. Do this now?"""),
1972 yesDefault=True) 2344 yesDefault=True,
2345 )
1973 if res: 2346 if res:
1974 self.project.reopenProject() 2347 self.project.reopenProject()
1975 2348
1976 def __hgGraftContinue(self): 2349 def __hgGraftContinue(self):
1977 """ 2350 """
1978 Private slot used to continue the last copying session after conflicts 2351 Private slot used to continue the last copying session after conflicts
1979 were resolved. 2352 were resolved.
1980 """ 2353 """
1982 if shouldReopen: 2355 if shouldReopen:
1983 res = EricMessageBox.yesNo( 2356 res = EricMessageBox.yesNo(
1984 None, 2357 None,
1985 self.tr("Copy Changesets (Continue)"), 2358 self.tr("Copy Changesets (Continue)"),
1986 self.tr("""The project should be reread. Do this now?"""), 2359 self.tr("""The project should be reread. Do this now?"""),
1987 yesDefault=True) 2360 yesDefault=True,
2361 )
1988 if res: 2362 if res:
1989 self.project.reopenProject() 2363 self.project.reopenProject()
1990 2364
1991 def __hgGraftStop(self): 2365 def __hgGraftStop(self):
1992 """ 2366 """
1993 Private slot used to stop an interrupted copying session. 2367 Private slot used to stop an interrupted copying session.
1994 """ 2368 """
1995 shouldReopen = self.vcs.hgGraftStop() 2369 shouldReopen = self.vcs.hgGraftStop()
1996 if shouldReopen: 2370 if shouldReopen:
1997 res = EricMessageBox.yesNo( 2371 res = EricMessageBox.yesNo(
1998 None, 2372 None,
1999 self.tr("Copy Changesets (Stop)"), 2373 self.tr("Copy Changesets (Stop)"),
2000 self.tr("""The project should be reread. Do this now?"""), 2374 self.tr("""The project should be reread. Do this now?"""),
2001 yesDefault=True) 2375 yesDefault=True,
2376 )
2002 if res: 2377 if res:
2003 self.project.reopenProject() 2378 self.project.reopenProject()
2004 2379
2005 def __hgGraftAbort(self): 2380 def __hgGraftAbort(self):
2006 """ 2381 """
2007 Private slot used to abort an interrupted copying session and perform 2382 Private slot used to abort an interrupted copying session and perform
2008 a rollback. 2383 a rollback.
2009 """ 2384 """
2011 if shouldReopen: 2386 if shouldReopen:
2012 res = EricMessageBox.yesNo( 2387 res = EricMessageBox.yesNo(
2013 None, 2388 None,
2014 self.tr("Copy Changesets (Abort)"), 2389 self.tr("Copy Changesets (Abort)"),
2015 self.tr("""The project should be reread. Do this now?"""), 2390 self.tr("""The project should be reread. Do this now?"""),
2016 yesDefault=True) 2391 yesDefault=True,
2392 )
2017 if res: 2393 if res:
2018 self.project.reopenProject() 2394 self.project.reopenProject()
2019 2395
2020 def __hgAddSubrepository(self): 2396 def __hgAddSubrepository(self):
2021 """ 2397 """
2022 Private slot used to add a sub-repository. 2398 Private slot used to add a sub-repository.
2023 """ 2399 """
2024 self.vcs.hgAddSubrepository() 2400 self.vcs.hgAddSubrepository()
2025 2401
2026 def __hgRemoveSubrepositories(self): 2402 def __hgRemoveSubrepositories(self):
2027 """ 2403 """
2028 Private slot used to remove sub-repositories. 2404 Private slot used to remove sub-repositories.
2029 """ 2405 """
2030 self.vcs.hgRemoveSubrepositories() 2406 self.vcs.hgRemoveSubrepositories()
2031 2407
2032 def __hgSummary(self): 2408 def __hgSummary(self):
2033 """ 2409 """
2034 Private slot to show a working directory summary. 2410 Private slot to show a working directory summary.
2035 """ 2411 """
2036 self.vcs.hgSummary() 2412 self.vcs.hgSummary()
2037 2413
2038 def __hgArchive(self): 2414 def __hgArchive(self):
2039 """ 2415 """
2040 Private slot to create an unversioned archive from the repository. 2416 Private slot to create an unversioned archive from the repository.
2041 """ 2417 """
2042 self.vcs.hgArchive() 2418 self.vcs.hgArchive()
2043 2419
2044 def __hgBookmarksList(self): 2420 def __hgBookmarksList(self):
2045 """ 2421 """
2046 Private slot used to list the bookmarks. 2422 Private slot used to list the bookmarks.
2047 """ 2423 """
2048 self.vcs.hgListBookmarks() 2424 self.vcs.hgListBookmarks()
2049 2425
2050 def __hgBookmarkDefine(self): 2426 def __hgBookmarkDefine(self):
2051 """ 2427 """
2052 Private slot used to define a bookmark. 2428 Private slot used to define a bookmark.
2053 """ 2429 """
2054 self.vcs.hgBookmarkDefine() 2430 self.vcs.hgBookmarkDefine()
2055 2431
2056 def __hgBookmarkDelete(self): 2432 def __hgBookmarkDelete(self):
2057 """ 2433 """
2058 Private slot used to delete a bookmark. 2434 Private slot used to delete a bookmark.
2059 """ 2435 """
2060 self.vcs.hgBookmarkDelete() 2436 self.vcs.hgBookmarkDelete()
2061 2437
2062 def __hgBookmarkRename(self): 2438 def __hgBookmarkRename(self):
2063 """ 2439 """
2064 Private slot used to rename a bookmark. 2440 Private slot used to rename a bookmark.
2065 """ 2441 """
2066 self.vcs.hgBookmarkRename() 2442 self.vcs.hgBookmarkRename()
2067 2443
2068 def __hgBookmarkMove(self): 2444 def __hgBookmarkMove(self):
2069 """ 2445 """
2070 Private slot used to move a bookmark. 2446 Private slot used to move a bookmark.
2071 """ 2447 """
2072 self.vcs.hgBookmarkMove() 2448 self.vcs.hgBookmarkMove()
2073 2449
2074 def __hgBookmarkIncoming(self): 2450 def __hgBookmarkIncoming(self):
2075 """ 2451 """
2076 Private slot used to show a list of incoming bookmarks. 2452 Private slot used to show a list of incoming bookmarks.
2077 """ 2453 """
2078 self.vcs.hgBookmarkIncoming() 2454 self.vcs.hgBookmarkIncoming()
2079 2455
2080 def __hgBookmarkOutgoing(self): 2456 def __hgBookmarkOutgoing(self):
2081 """ 2457 """
2082 Private slot used to show a list of outgoing bookmarks. 2458 Private slot used to show a list of outgoing bookmarks.
2083 """ 2459 """
2084 self.vcs.hgBookmarkOutgoing() 2460 self.vcs.hgBookmarkOutgoing()
2085 2461
2086 def __hgBookmarkPull(self): 2462 def __hgBookmarkPull(self):
2087 """ 2463 """
2088 Private slot used to pull a bookmark from a remote repository. 2464 Private slot used to pull a bookmark from a remote repository.
2089 """ 2465 """
2090 self.vcs.hgBookmarkPull() 2466 self.vcs.hgBookmarkPull()
2091 2467
2092 def __hgBookmarkPullCurrent(self): 2468 def __hgBookmarkPullCurrent(self):
2093 """ 2469 """
2094 Private slot used to pull the current bookmark from a remote 2470 Private slot used to pull the current bookmark from a remote
2095 repository. 2471 repository.
2096 """ 2472 """
2097 self.vcs.hgBookmarkPull(current=True) 2473 self.vcs.hgBookmarkPull(current=True)
2098 2474
2099 def __hgBookmarkPush(self): 2475 def __hgBookmarkPush(self):
2100 """ 2476 """
2101 Private slot used to push a bookmark to a remote repository. 2477 Private slot used to push a bookmark to a remote repository.
2102 """ 2478 """
2103 self.vcs.hgBookmarkPush() 2479 self.vcs.hgBookmarkPush()
2104 2480
2105 def __hgBookmarkPushCurrent(self): 2481 def __hgBookmarkPushCurrent(self):
2106 """ 2482 """
2107 Private slot used to push the current bookmark to a remote repository. 2483 Private slot used to push the current bookmark to a remote repository.
2108 """ 2484 """
2109 self.vcs.hgBookmarkPush(current=True) 2485 self.vcs.hgBookmarkPush(current=True)
2110 2486
2111 def __hgBookmarkPushAll(self): 2487 def __hgBookmarkPushAll(self):
2112 """ 2488 """
2113 Private slot to push all bookmarks to a remote repository. 2489 Private slot to push all bookmarks to a remote repository.
2114 """ 2490 """
2115 self.vcs.hgBookmarkPush(allBookmarks=True) 2491 self.vcs.hgBookmarkPush(allBookmarks=True)
2116 2492
2117 def __hgDeleteBackups(self): 2493 def __hgDeleteBackups(self):
2118 """ 2494 """
2119 Private slot used to delete all backup bundles. 2495 Private slot used to delete all backup bundles.
2120 """ 2496 """
2121 self.vcs.hgDeleteBackups() 2497 self.vcs.hgDeleteBackups()

eric ide

mercurial