17 from eric7.Plugins.VcsPlugins.vcsPySvn.SvnUtilities import getConfigPath, getServersPath |
17 from eric7.Plugins.VcsPlugins.vcsPySvn.SvnUtilities import getConfigPath, getServersPath |
18 from eric7.Preferences.Shortcuts import readShortcuts |
18 from eric7.Preferences.Shortcuts import readShortcuts |
19 from eric7.UI import Info |
19 from eric7.UI import Info |
20 |
20 |
21 # Start-Of-Header |
21 # Start-Of-Header |
22 name = "PySvn Plugin" |
22 __header__ = { |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
23 "name": "PySvn Plugin", |
24 autoactivate = False |
24 "author": "Detlev Offenbach <detlev@die-offenbachs.de>", |
25 deactivateable = True |
25 "autoactivate": False, |
26 version = Info.VersionOnly |
26 "deactivateable": True, |
27 pluginType = "version_control" |
27 "version": Info.VersionOnly, |
28 pluginTypename = "PySvn" |
28 "pluginType": "version_control", |
29 className = "VcsPySvnPlugin" |
29 "pluginTypename": "PySvn", |
30 packageName = "__core__" |
30 "className": "VcsPySvnPlugin", |
31 shortDescription = "Implements the PySvn version control interface." |
31 "packageName": "__core__", |
32 longDescription = """This plugin provides the PySvn version control interface.""" |
32 "shortDescription": "Implements the PySvn version control interface.", |
33 pyqtApi = 2 |
33 "longDescription": """This plugin provides the PySvn version control interface.""", |
|
34 "pyqtApi": 2, |
|
35 } |
34 # End-Of-Header |
36 # End-Of-Header |
35 |
37 |
36 error = "" |
38 error = "" # noqa: U200 |
37 |
39 |
38 |
40 |
39 def exeDisplayData(): |
41 def exeDisplayData(): |
40 """ |
42 """ |
41 Public method to support the display of some executable info. |
43 Public method to support the display of some executable info. |
71 Public function to get the indicators for this version control system. |
73 Public function to get the indicators for this version control system. |
72 |
74 |
73 @return dictionary with indicator as key and a tuple with the vcs name |
75 @return dictionary with indicator as key and a tuple with the vcs name |
74 (string) and vcs display string (string) |
76 (string) and vcs display string (string) |
75 """ |
77 """ |
76 global pluginTypename |
78 ##global pluginTypename |
77 return { |
79 return { |
78 ".svn": (pluginTypename, displayString()), |
80 ".svn": (__header__["pluginTypename"], displayString()), |
79 "_svn": (pluginTypename, displayString()), |
81 "_svn": (__header__["pluginTypename"], displayString()), |
80 } |
82 } |
81 |
83 |
82 |
84 |
83 def displayString(): |
85 def displayString(): |
84 """ |
86 """ |
166 } |
168 } |
167 |
169 |
168 self.__projectHelperObject = PySvnProjectHelper(None, None) |
170 self.__projectHelperObject = PySvnProjectHelper(None, None) |
169 with contextlib.suppress(KeyError): |
171 with contextlib.suppress(KeyError): |
170 ericApp().registerPluginObject( |
172 ericApp().registerPluginObject( |
171 pluginTypename, self.__projectHelperObject, pluginType |
173 __header__["pluginTypename"], |
172 ) |
174 self.__projectHelperObject, |
173 readShortcuts(pluginName=pluginTypename) |
175 __header__["pluginType"], |
|
176 ) |
|
177 readShortcuts(pluginName=__header__["pluginTypename"]) |
174 |
178 |
175 def getProjectHelper(self): |
179 def getProjectHelper(self): |
176 """ |
180 """ |
177 Public method to get a reference to the project helper object. |
181 Public method to get a reference to the project helper object. |
178 |
182 |
279 |
283 |
280 def prepareUninstall(self): |
284 def prepareUninstall(self): |
281 """ |
285 """ |
282 Public method to prepare for an uninstallation. |
286 Public method to prepare for an uninstallation. |
283 """ |
287 """ |
284 ericApp().unregisterPluginObject(pluginTypename) |
288 ericApp().unregisterPluginObject(__header__["pluginTypename"]) |
285 |
289 |
286 def prepareUnload(self): |
290 def prepareUnload(self): |
287 """ |
291 """ |
288 Public method to prepare for an unload. |
292 Public method to prepare for an unload. |
289 """ |
293 """ |
290 if self.__projectHelperObject: |
294 if self.__projectHelperObject: |
291 self.__projectHelperObject.removeToolbar( |
295 self.__projectHelperObject.removeToolbar( |
292 self.__ui, ericApp().getObject("ToolbarManager") |
296 self.__ui, ericApp().getObject("ToolbarManager") |
293 ) |
297 ) |
294 ericApp().unregisterPluginObject(pluginTypename) |
298 ericApp().unregisterPluginObject(__header__["pluginTypename"]) |