Tue, 18 Oct 2022 16:06:21 +0200
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
8881
54e42bc2437a
Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8358
diff
changeset
|
3 | # Copyright (c) 2014 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing the shelve extension project browser helper. |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
8318
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
10 | from PyQt6.QtWidgets import QMenu |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | |
9413
80c06d472826
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9221
diff
changeset
|
12 | from eric7.EricWidgets import EricMessageBox |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | from ..HgExtensionProjectBrowserHelper import HgExtensionProjectBrowserHelper |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | class ShelveProjectBrowserHelper(HgExtensionProjectBrowserHelper): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | Class implementing the shelve extension project browser helper. |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
21 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | def __init__(self, vcsObject, browserObject, projectObject): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | Constructor |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
25 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | @param vcsObject reference to the vcs object |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | @param browserObject reference to the project browser object |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | @param projectObject reference to the project object |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | """ |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
30 | super().__init__(vcsObject, browserObject, projectObject) |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
31 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | def initMenus(self): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | Public method to generate the extension menus. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
35 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | @return dictionary of populated menu (dict of QMenu). The dict |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | must have the keys 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' |
3359
6b6c224d67d6
Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3312
diff
changeset
|
38 | and 'dirMultiMenu'. |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
40 | self.__menus = {} |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
41 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | menu = QMenu(self.menuTitle()) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | menu.setTearOffEnabled(True) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | menu.addAction(self.tr("Shelve changes"), self.__hgShelve) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
45 | self.__menus["mainMenu"] = menu |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
46 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | menu = QMenu(self.menuTitle()) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | menu.setTearOffEnabled(True) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | menu.addAction(self.tr("Shelve changes"), self.__hgShelve) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
50 | self.__menus["multiMenu"] = menu |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
51 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | menu = QMenu(self.menuTitle()) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | menu.setTearOffEnabled(True) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | menu.addAction(self.tr("Shelve changes"), self.__hgShelve) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
55 | self.__menus["dirMenu"] = menu |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
56 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | menu = QMenu(self.menuTitle()) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | menu.setTearOffEnabled(True) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | menu.addAction(self.tr("Shelve changes"), self.__hgShelve) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
60 | self.__menus["dirMultiMenu"] = menu |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
61 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
62 | return self.__menus |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
63 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
64 | def menuTitle(self): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
65 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
66 | Public method to get the menu title. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
67 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
68 | @return title of the menu (string) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
69 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
70 | return self.tr("Shelve") |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
71 | |
3312
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
72 | def showExtensionMenu(self, key, controlled): |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
73 | """ |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
74 | Public method to prepare the extension menu for display. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
75 | |
3312
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
76 | @param key menu key (string, one of 'mainMenu', 'multiMenu', |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
77 | 'backMenu', 'dirMenu' or 'dirMultiMenu') |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
78 | @param controlled flag indicating to prepare the menu for a |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
79 | version controlled entry or a non-version controlled entry |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
80 | (boolean) |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
81 | """ |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
82 | if key in self.__menus: |
7535e5a5cbce
Extended the Mercurial project browser helper to adjust extension menus depending on current selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3305
diff
changeset
|
83 | self.__menus[key].setEnabled(controlled) |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
84 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
85 | def __reopenProject(self, shouldReopen, title): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
86 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
87 | Private method to reopen the project if needed and wanted. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
88 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
89 | @param shouldReopen flag indicating that the project should |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
90 | be reopened (boolean) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
91 | @param title title of the message box (string) |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
92 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
93 | if shouldReopen: |
8356
68ec9c3d4de5
Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8318
diff
changeset
|
94 | res = EricMessageBox.yesNo( |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
95 | None, |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
96 | title, |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
97 | self.tr("""The project should be reread. Do this now?"""), |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
98 | yesDefault=True, |
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
99 | ) |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
100 | if res: |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
101 | self.project.reopenProject() |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
102 | |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
103 | def __hgShelve(self): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
104 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
105 | Private slot used to shelve all current changes. |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
106 | """ |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
107 | names = [] |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
108 | for itm in self.browser.getSelectedItems(): |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
109 | try: |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
110 | name = itm.fileName() |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
111 | except AttributeError: |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
112 | name = itm.dirName() |
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
113 | names.append(name) |
7257
c4d0cac9b5c9
Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
114 | shouldReopen = self.vcs.getExtensionObject("shelve").hgShelve(names) |
3305
cf4f22a19dc6
Added support for the Mercurial shelve extension to the project browser VCS context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
115 | self.__reopenProject(shouldReopen, self.tr("Shelve")) |