eric6/Plugins/PluginVcsPySvn.py

changeset 8240
93b8a353c4bf
parent 8218
7c09585bd960
equal deleted inserted replaced
8239:59a9a658618c 8240:93b8a353c4bf
6 """ 6 """
7 Module implementing the PySvn version control plugin. 7 Module implementing the PySvn version control plugin.
8 """ 8 """
9 9
10 import os 10 import os
11 import contextlib
11 12
12 from PyQt5.QtCore import QObject, QCoreApplication 13 from PyQt5.QtCore import QObject, QCoreApplication
13 14
14 from E5Gui.E5Application import e5App 15 from E5Gui.E5Application import e5App
15 16
158 "CommitMessages": 20, 159 "CommitMessages": 20,
159 } 160 }
160 161
161 from VcsPlugins.vcsPySvn.ProjectHelper import PySvnProjectHelper 162 from VcsPlugins.vcsPySvn.ProjectHelper import PySvnProjectHelper
162 self.__projectHelperObject = PySvnProjectHelper(None, None) 163 self.__projectHelperObject = PySvnProjectHelper(None, None)
163 try: 164 with contextlib.suppress(KeyError):
164 e5App().registerPluginObject( 165 e5App().registerPluginObject(
165 pluginTypename, self.__projectHelperObject, pluginType) 166 pluginTypename, self.__projectHelperObject, pluginType)
166 except KeyError:
167 pass # ignore duplicate registration
168 readShortcuts(pluginName=pluginTypename) 167 readShortcuts(pluginName=pluginTypename)
169 168
170 def getProjectHelper(self): 169 def getProjectHelper(self):
171 """ 170 """
172 Public method to get a reference to the project helper object. 171 Public method to get a reference to the project helper object.

eric ide

mercurial