eric6/VCS/VersionControl.py

branch
without_py2_and_pyqt4
changeset 7192
a22eee00b052
parent 7167
b3557e77314a
child 7229
53054eb5b15a
equal deleted inserted replaced
7191:960850ec284c 7192:a22eee00b052
95 @exception RuntimeError to indicate that this method must be 95 @exception RuntimeError to indicate that this method must be
96 implemented by a subclass 96 implemented by a subclass
97 """ 97 """
98 raise RuntimeError('Not implemented') 98 raise RuntimeError('Not implemented')
99 99
100 return (False, "")
101
100 def vcsInit(self, vcsDir, noDialog=False): 102 def vcsInit(self, vcsDir, noDialog=False):
101 """ 103 """
102 Public method used to initialize the vcs. 104 Public method used to initialize the vcs.
103 105
104 @param vcsDir name of the VCS directory (string) 106 @param vcsDir name of the VCS directory (string)
106 @return flag indicating success (boolean) 108 @return flag indicating success (boolean)
107 @exception RuntimeError to indicate that this method must be 109 @exception RuntimeError to indicate that this method must be
108 implemented by a subclass 110 implemented by a subclass
109 """ 111 """
110 raise RuntimeError('Not implemented') 112 raise RuntimeError('Not implemented')
113
114 return False
111 115
112 def vcsConvertProject(self, vcsDataDict, project, addAll=True): 116 def vcsConvertProject(self, vcsDataDict, project, addAll=True):
113 """ 117 """
114 Public method to convert an uncontrolled project to a version 118 Public method to convert an uncontrolled project to a version
115 controlled project. 119 controlled project.
136 @param noDialog flag indicating quiet operations 140 @param noDialog flag indicating quiet operations
137 @type bool 141 @type bool
138 @param addAll flag indicating to add all files to the repository 142 @param addAll flag indicating to add all files to the repository
139 @type bool 143 @type bool
140 @return tuple containing a flag indicating an execution without errors 144 @return tuple containing a flag indicating an execution without errors
141 and a flag indicating the version controll status 145 and a flag indicating the version control status
142 @rtype tuple of (bool, bool) 146 @rtype tuple of (bool, bool)
143 @exception RuntimeError to indicate that this method must be 147 @exception RuntimeError to indicate that this method must be
144 implemented by a subclass 148 implemented by a subclass
145 """ 149 """
146 raise RuntimeError('Not implemented') 150 raise RuntimeError('Not implemented')
151
152 return (False, False)
147 153
148 def vcsCheckout(self, vcsDataDict, projectDir, noDialog=False): 154 def vcsCheckout(self, vcsDataDict, projectDir, noDialog=False):
149 """ 155 """
150 Public method used to check the project out of the vcs. 156 Public method used to check the project out of the vcs.
151 157
156 @exception RuntimeError to indicate that this method must be 162 @exception RuntimeError to indicate that this method must be
157 implemented by a subclass 163 implemented by a subclass
158 """ 164 """
159 raise RuntimeError('Not implemented') 165 raise RuntimeError('Not implemented')
160 166
167 return False
168
161 def vcsExport(self, vcsDataDict, projectDir): 169 def vcsExport(self, vcsDataDict, projectDir):
162 """ 170 """
163 Public method used to export a directory from the vcs. 171 Public method used to export a directory from the vcs.
164 172
165 @param vcsDataDict dictionary of data required for the export 173 @param vcsDataDict dictionary of data required for the export
167 @return flag indicating an execution without errors (boolean) 175 @return flag indicating an execution without errors (boolean)
168 @exception RuntimeError to indicate that this method must be 176 @exception RuntimeError to indicate that this method must be
169 implemented by a subclass 177 implemented by a subclass
170 """ 178 """
171 raise RuntimeError('Not implemented') 179 raise RuntimeError('Not implemented')
180
181 return False
172 182
173 def vcsCommit(self, name, message, noDialog=False): 183 def vcsCommit(self, name, message, noDialog=False):
174 """ 184 """
175 Public method used to make the change of a file/directory permanent in 185 Public method used to make the change of a file/directory permanent in
176 the vcs. 186 the vcs.
182 @exception RuntimeError to indicate that this method must be 192 @exception RuntimeError to indicate that this method must be
183 implemented by a subclass 193 implemented by a subclass
184 """ 194 """
185 raise RuntimeError('Not implemented') 195 raise RuntimeError('Not implemented')
186 196
197 return False
198
187 def vcsUpdate(self, name, noDialog=False): 199 def vcsUpdate(self, name, noDialog=False):
188 """ 200 """
189 Public method used to update a file/directory in the vcs. 201 Public method used to update a file/directory in the vcs.
190 202
191 @param name file/directory name to be updated (string) 203 @param name file/directory name to be updated (string)
195 @exception RuntimeError to indicate that this method must be 207 @exception RuntimeError to indicate that this method must be
196 implemented by a subclass 208 implemented by a subclass
197 """ 209 """
198 raise RuntimeError('Not implemented') 210 raise RuntimeError('Not implemented')
199 211
212 return False
213
200 def vcsAdd(self, name, isDir=False, noDialog=False): 214 def vcsAdd(self, name, isDir=False, noDialog=False):
201 """ 215 """
202 Public method used to add a file/directory in the vcs. 216 Public method used to add a file/directory in the vcs.
203 217
204 @param name file/directory name to be added (string) 218 @param name file/directory name to be added (string)
240 @return flag indicating success (boolean) 254 @return flag indicating success (boolean)
241 @exception RuntimeError to indicate that this method must be 255 @exception RuntimeError to indicate that this method must be
242 implemented by a subclass 256 implemented by a subclass
243 """ 257 """
244 raise RuntimeError('Not implemented') 258 raise RuntimeError('Not implemented')
259
260 return False
245 261
246 def vcsMove(self, name, project, target=None, noDialog=False): 262 def vcsMove(self, name, project, target=None, noDialog=False):
247 """ 263 """
248 Public method used to move a file/directory. 264 Public method used to move a file/directory.
249 265
255 @exception RuntimeError to indicate that this method must be 271 @exception RuntimeError to indicate that this method must be
256 implemented by a subclass 272 implemented by a subclass
257 """ 273 """
258 raise RuntimeError('Not implemented') 274 raise RuntimeError('Not implemented')
259 275
276 return False
277
260 def vcsLogBrowser(self, name, isFile=False): 278 def vcsLogBrowser(self, name, isFile=False):
261 """ 279 """
262 Public method used to view the log of a file/directory in the vcs 280 Public method used to view the log of a file/directory in the vcs
263 with a log browser dialog. 281 with a log browser dialog.
264 282
320 @exception RuntimeError to indicate that this method must be 338 @exception RuntimeError to indicate that this method must be
321 implemented by a subclass 339 implemented by a subclass
322 """ 340 """
323 raise RuntimeError('Not implemented') 341 raise RuntimeError('Not implemented')
324 342
343 return False
344
325 def vcsMerge(self, name): 345 def vcsMerge(self, name):
326 """ 346 """
327 Public method used to merge a tag/branch into the local project. 347 Public method used to merge a tag/branch into the local project.
328 348
329 @param name file/directory name to be merged (string) 349 @param name file/directory name to be merged (string)
341 0 in order to signal an error 361 0 in order to signal an error
342 @exception RuntimeError to indicate that this method must be 362 @exception RuntimeError to indicate that this method must be
343 implemented by a subclass 363 implemented by a subclass
344 """ 364 """
345 raise RuntimeError('Not implemented') 365 raise RuntimeError('Not implemented')
366
367 return 0
346 368
347 def vcsAllRegisteredStates(self, names, dname): 369 def vcsAllRegisteredStates(self, names, dname):
348 """ 370 """
349 Public method used to get the registered states of a number of files 371 Public method used to get the registered states of a number of files
350 in the vcs. 372 in the vcs.
356 @exception RuntimeError to indicate that this method must be 378 @exception RuntimeError to indicate that this method must be
357 implemented by a subclass 379 implemented by a subclass
358 """ 380 """
359 raise RuntimeError('Not implemented') 381 raise RuntimeError('Not implemented')
360 382
383 return {}
384
361 def vcsName(self): 385 def vcsName(self):
362 """ 386 """
363 Public method returning the name of the vcs. 387 Public method returning the name of the vcs.
364 388
365 @return name of the vcs (string) 389 @return name of the vcs (string)
366 @exception RuntimeError to indicate that this method must be 390 @exception RuntimeError to indicate that this method must be
367 implemented by a subclass 391 implemented by a subclass
368 """ 392 """
369 raise RuntimeError('Not implemented') 393 raise RuntimeError('Not implemented')
394
395 return ""
370 396
371 def vcsCleanup(self, name): 397 def vcsCleanup(self, name):
372 """ 398 """
373 Public method used to cleanup the local copy. 399 Public method used to cleanup the local copy.
374 400
422 @exception RuntimeError to indicate that this method must be 448 @exception RuntimeError to indicate that this method must be
423 implemented by a subclass 449 implemented by a subclass
424 """ 450 """
425 raise RuntimeError('Not implemented') 451 raise RuntimeError('Not implemented')
426 452
453 return ""
454
427 def vcsGetProjectBrowserHelper(self, browser, project, 455 def vcsGetProjectBrowserHelper(self, browser, project,
428 isTranslationsBrowser=False): 456 isTranslationsBrowser=False):
429 """ 457 """
430 Public method to instanciate a helper object for the different 458 Public method to instanciate a helper object for the different
431 project browsers. 459 project browsers.
438 @exception RuntimeError to indicate that this method must be 466 @exception RuntimeError to indicate that this method must be
439 implemented by a subclass 467 implemented by a subclass
440 """ 468 """
441 raise RuntimeError('Not implemented') 469 raise RuntimeError('Not implemented')
442 470
471 return None # __IGNORE_WARNING_M831__
472
443 def vcsGetProjectHelper(self, project): 473 def vcsGetProjectHelper(self, project):
444 """ 474 """
445 Public method to instanciate a helper object for the project. 475 Public method to instanciate a helper object for the project.
446 476
447 @param project reference to the project object 477 @param project reference to the project object
448 @return the project helper object 478 @return the project helper object
449 @exception RuntimeError to indicate that this method must be 479 @exception RuntimeError to indicate that this method must be
450 implemented by a subclass 480 implemented by a subclass
451 """ 481 """
452 raise RuntimeError('Not implemented') 482 raise RuntimeError('Not implemented')
483
484 return None # __IGNORE_WARNING_M831__
453 485
454 ##################################################################### 486 #####################################################################
455 ## methods above need to be implemented by a subclass 487 ## methods above need to be implemented by a subclass
456 ##################################################################### 488 #####################################################################
457 489

eric ide

mercurial