32 pluginType = "version_control" |
32 pluginType = "version_control" |
33 pluginTypename = "Subversion" |
33 pluginTypename = "Subversion" |
34 className = "VcsSubversionPlugin" |
34 className = "VcsSubversionPlugin" |
35 packageName = "__core__" |
35 packageName = "__core__" |
36 shortDescription = "Implements the Subversion version control interface." |
36 shortDescription = "Implements the Subversion version control interface." |
37 longDescription = """This plugin provides the Subversion version control interface.""" |
37 longDescription = \ |
|
38 """This plugin provides the Subversion version control interface.""" |
38 pyqtApi = 2 |
39 pyqtApi = 2 |
39 # End-Of-Header |
40 # End-Of-Header |
40 |
41 |
41 error = "" |
42 error = "" |
42 |
43 |
69 |
70 |
70 def getVcsSystemIndicator(): |
71 def getVcsSystemIndicator(): |
71 """ |
72 """ |
72 Public function to get the indicators for this version control system. |
73 Public function to get the indicators for this version control system. |
73 |
74 |
74 @return dictionary with indicator as key and a tuple with the vcs name (string) |
75 @return dictionary with indicator as key and a tuple with the vcs name |
75 and vcs display string (string) |
76 (string) and vcs display string (string) |
76 """ |
77 """ |
77 global pluginTypename |
78 global pluginTypename |
78 data = {} |
79 data = {} |
79 exe = 'svn' |
80 exe = 'svn' |
80 if Utilities.isWindowsPlatform(): |
81 if Utilities.isWindowsPlatform(): |
93 """ |
94 """ |
94 exe = 'svn' |
95 exe = 'svn' |
95 if Utilities.isWindowsPlatform(): |
96 if Utilities.isWindowsPlatform(): |
96 exe += '.exe' |
97 exe += '.exe' |
97 if Utilities.isinpath(exe): |
98 if Utilities.isinpath(exe): |
98 return QApplication.translate('VcsSubversionPlugin', 'Subversion (svn)') |
99 return QApplication.translate( |
|
100 'VcsSubversionPlugin', 'Subversion (svn)') |
99 else: |
101 else: |
100 return "" |
102 return "" |
101 |
103 |
102 subversionCfgPluginObject = None |
104 subversionCfgPluginObject = None |
103 |
105 |
104 |
106 |
105 def createConfigurationPage(configDlg): |
107 def createConfigurationPage(configDlg): |
106 """ |
108 """ |
107 Module function to create the configuration page. |
109 Module function to create the configuration page. |
108 |
110 |
|
111 @param configDlg reference to the configuration dialog (QDialog) |
109 @return reference to the configuration page |
112 @return reference to the configuration page |
110 """ |
113 """ |
111 global subversionCfgPluginObject |
114 global subversionCfgPluginObject |
112 from VcsPlugins.vcsSubversion.ConfigurationPage.SubversionPage import SubversionPage |
115 from VcsPlugins.vcsSubversion.ConfigurationPage.SubversionPage import \ |
|
116 SubversionPage |
113 if subversionCfgPluginObject is None: |
117 if subversionCfgPluginObject is None: |
114 subversionCfgPluginObject = VcsSubversionPlugin(None) |
118 subversionCfgPluginObject = VcsSubversionPlugin(None) |
115 page = SubversionPage(subversionCfgPluginObject) |
119 page = SubversionPage(subversionCfgPluginObject) |
116 return page |
120 return page |
117 |
121 |
118 |
122 |
119 def getConfigData(): |
123 def getConfigData(): |
120 """ |
124 """ |
121 Module function returning data as required by the configuration dialog. |
125 Module function returning data as required by the configuration dialog. |
122 |
126 |
123 @return dictionary with key "zzz_subversionPage" containing the relevant data |
127 @return dictionary with key "zzz_subversionPage" containing the relevant |
|
128 data |
124 """ |
129 """ |
125 return { |
130 return { |
126 "zzz_subversionPage": \ |
131 "zzz_subversionPage": \ |
127 [QApplication.translate("VcsSubversionPlugin", "Subversion"), |
132 [QApplication.translate("VcsSubversionPlugin", "Subversion"), |
128 os.path.join("VcsPlugins", "vcsSubversion", "icons", |
133 os.path.join("VcsPlugins", "vcsSubversion", "icons", |
133 |
138 |
134 def prepareUninstall(): |
139 def prepareUninstall(): |
135 """ |
140 """ |
136 Module function to prepare for an uninstallation. |
141 Module function to prepare for an uninstallation. |
137 """ |
142 """ |
138 if not e5App().getObject("PluginManager").isPluginLoaded("PluginVcsSubversion"): |
143 if not e5App().getObject("PluginManager").isPluginLoaded( |
|
144 "PluginVcsSubversion"): |
139 Preferences.Prefs.settings.remove("Subversion") |
145 Preferences.Prefs.settings.remove("Subversion") |
140 |
146 |
141 |
147 |
142 class VcsSubversionPlugin(QObject): |
148 class VcsSubversionPlugin(QObject): |
143 """ |
149 """ |
159 } |
165 } |
160 |
166 |
161 from VcsPlugins.vcsSubversion.ProjectHelper import SvnProjectHelper |
167 from VcsPlugins.vcsSubversion.ProjectHelper import SvnProjectHelper |
162 self.__projectHelperObject = SvnProjectHelper(None, None) |
168 self.__projectHelperObject = SvnProjectHelper(None, None) |
163 try: |
169 try: |
164 e5App().registerPluginObject(pluginTypename, self.__projectHelperObject, |
170 e5App().registerPluginObject( |
165 pluginType) |
171 pluginTypename, self.__projectHelperObject, pluginType) |
166 except KeyError: |
172 except KeyError: |
167 pass # ignore duplicate registration |
173 pass # ignore duplicate registration |
168 readShortcuts(pluginName=pluginTypename) |
174 readShortcuts(pluginName=pluginTypename) |
169 |
175 |
170 def getProjectHelper(self): |
176 def getProjectHelper(self): |