src/eric7/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
186 186
187 def initMenu(self, mainMenu): 187 def initMenu(self, mainMenu):
188 """ 188 """
189 Public method to generate the extension menu. 189 Public method to generate the extension menu.
190 190
191 @param mainMenu reference to the main menu (QMenu) 191 @param mainMenu reference to the main menu
192 @return populated menu (QMenu) 192 @type QMenu
193 @return populated menu
194 @rtype QMenu
193 """ 195 """
194 menu = QMenu(self.menuTitle(), mainMenu) 196 menu = QMenu(self.menuTitle(), mainMenu)
195 menu.setTearOffEnabled(True) 197 menu.setTearOffEnabled(True)
196 198
197 self.__adminMenu = QMenu(self.tr("Administration"), menu) 199 self.__adminMenu = QMenu(self.tr("Administration"), menu)
213 215
214 def menuTitle(self): 216 def menuTitle(self):
215 """ 217 """
216 Public method to get the menu title. 218 Public method to get the menu title.
217 219
218 @return title of the menu (string) 220 @return title of the menu
221 @rtype str
219 """ 222 """
220 return self.tr("Large Files") 223 return self.tr("Large Files")
221 224
222 def shutdown(self): 225 def shutdown(self):
223 """ 226 """
230 233
231 def __hgLfconvert(self, direction): 234 def __hgLfconvert(self, direction):
232 """ 235 """
233 Private slot to convert the repository format of the current project. 236 Private slot to convert the repository format of the current project.
234 237
235 @param direction direction of the conversion (string; one of 238 @param direction direction of the conversion (one of 'largefiles' or 'normal')
236 'largefiles' or 'normal') 239 @type str
237 @exception ValueError raised to indicate a bad value for the 240 @exception ValueError raised to indicate a bad value for the
238 'direction' parameter. 241 'direction' parameter.
239 """ 242 """
240 if direction not in ["largefiles", "normal"]: 243 if direction not in ["largefiles", "normal"]:
241 raise ValueError("Bad value for 'direction' parameter.") 244 raise ValueError("Bad value for 'direction' parameter.")
258 261
259 def __hgLfVerify(self, mode): 262 def __hgLfVerify(self, mode):
260 """ 263 """
261 Private slot to verify large files integrity. 264 Private slot to verify large files integrity.
262 265
263 @param mode verify mode (string; one of 'large', 'lfa' or 'lfc') 266 @param mode verify mode (one of 'large', 'lfa' or 'lfc')
264 @exception ValueError raised to indicate a bad value for the 267 @type str
265 'mode' parameter. 268 @exception ValueError raised to indicate a bad value for the 'mode' parameter.
266 """ 269 """
267 if mode not in ["large", "lfa", "lfc"]: 270 if mode not in ["large", "lfa", "lfc"]:
268 raise ValueError("Bad value for 'mode' parameter.") 271 raise ValueError("Bad value for 'mode' parameter.")
269 272
270 self.vcs.getExtensionObject("largefiles").hgLfVerify(mode) 273 self.vcs.getExtensionObject("largefiles").hgLfVerify(mode)

eric ide

mercurial