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