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