eric6/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py

changeset 7628
f904d0eef264
parent 7533
88261c96484b
child 7780
41420f82c0ac
equal deleted inserted replaced
7626:7f643d41464e 7628:f904d0eef264
192 """ 192 """
193 Private slot to convert the repository format of the current project. 193 Private slot to convert the repository format of the current project.
194 194
195 @param direction direction of the conversion (string; one of 195 @param direction direction of the conversion (string; one of
196 'largefiles' or 'normal') 196 'largefiles' or 'normal')
197 """ 197 @exception ValueError raised to indicate a bad value for the
198 assert direction in ["largefiles", "normal"] 198 'direction' parameter.
199 """
200 if direction not in ["largefiles", "normal"]:
201 raise ValueError("Bad value for 'direction' parameter.")
199 202
200 self.vcs.getExtensionObject("largefiles").hgLfconvert( 203 self.vcs.getExtensionObject("largefiles").hgLfconvert(
201 direction, self.project.getProjectFile()) 204 direction, self.project.getProjectFile())
202 205
203 def __hgLfPull(self): 206 def __hgLfPull(self):
216 def __hgLfVerify(self, mode): 219 def __hgLfVerify(self, mode):
217 """ 220 """
218 Private slot to verify large files integrity. 221 Private slot to verify large files integrity.
219 222
220 @param mode verify mode (string; one of 'large', 'lfa' or 'lfc') 223 @param mode verify mode (string; one of 'large', 'lfa' or 'lfc')
221 """ 224 @exception ValueError raised to indicate a bad value for the
222 assert mode in ['large', 'lfa', 'lfc'] 225 'mode' parameter.
226 """
227 if mode not in ['large', 'lfa', 'lfc']:
228 raise ValueError("Bad value for 'mode' parameter.")
223 229
224 self.vcs.getExtensionObject("largefiles").hgLfVerify( 230 self.vcs.getExtensionObject("largefiles").hgLfVerify(
225 self.project.getProjectPath(), mode) 231 self.project.getProjectPath(), mode)

eric ide

mercurial