eric6/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py

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

eric ide

mercurial