eric6/VCS/VersionControl.py

changeset 7167
b3557e77314a
parent 6942
2602857055c5
child 7192
a22eee00b052
equal deleted inserted replaced
7166:5a184952ba77 7167:b3557e77314a
88 88
89 def vcsExists(self): 89 def vcsExists(self):
90 """ 90 """
91 Public method used to test for the presence of the vcs. 91 Public method used to test for the presence of the vcs.
92 92
93 @ireturn tuple of flag indicating the existence and a string 93 @return tuple of flag indicating the existence and a string
94 giving an error message in case of failure 94 giving an error message in case of failure
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')
101 """ 101 """
102 Public method used to initialize the vcs. 102 Public method used to initialize the vcs.
103 103
104 @param vcsDir name of the VCS directory (string) 104 @param vcsDir name of the VCS directory (string)
105 @param noDialog flag indicating quiet operations (boolean) 105 @param noDialog flag indicating quiet operations (boolean)
106 @ireturn flag indicating success (boolean) 106 @return flag indicating success (boolean)
107 @exception RuntimeError to indicate that this method must be 107 @exception RuntimeError to indicate that this method must be
108 implemented by a subclass 108 implemented by a subclass
109 """ 109 """
110 raise RuntimeError('Not implemented') 110 raise RuntimeError('Not implemented')
111 111
112 def vcsConvertProject(self, vcsDataDict, project): 112 def vcsConvertProject(self, vcsDataDict, project, addAll=True):
113 """ 113 """
114 Public method to convert an uncontrolled project to a version 114 Public method to convert an uncontrolled project to a version
115 controlled project. 115 controlled project.
116 116
117 @param vcsDataDict dictionary of data required for the conversion 117 @param vcsDataDict dictionary of data required for the conversion
118 @type dict
118 @param project reference to the project object 119 @param project reference to the project object
119 @exception RuntimeError to indicate that this method must be 120 @type Project
120 implemented by a subclass 121 @param addAll flag indicating to add all files to the repository
121 """ 122 @type bool
122 raise RuntimeError('Not implemented') 123 @exception RuntimeError to indicate that this method must be
123 124 implemented by a subclass
124 def vcsImport(self, vcsDataDict, projectDir, noDialog=False): 125 """
126 raise RuntimeError('Not implemented')
127
128 def vcsImport(self, vcsDataDict, projectDir, noDialog=False, addAll=True):
125 """ 129 """
126 Public method used to import the project into the vcs. 130 Public method used to import the project into the vcs.
127 131
128 @param vcsDataDict dictionary of data required for the import 132 @param vcsDataDict dictionary of data required for the import
133 @type dict
129 @param projectDir project directory (string) 134 @param projectDir project directory (string)
135 @type str
130 @param noDialog flag indicating quiet operations 136 @param noDialog flag indicating quiet operations
131 @ireturn flag indicating an execution without errors (boolean) 137 @type bool
132 and a flag indicating the version controll status (boolean) 138 @param addAll flag indicating to add all files to the repository
139 @type bool
140 @return tuple containing a flag indicating an execution without errors
141 and a flag indicating the version controll status
142 @rtype tuple of (bool, bool)
133 @exception RuntimeError to indicate that this method must be 143 @exception RuntimeError to indicate that this method must be
134 implemented by a subclass 144 implemented by a subclass
135 """ 145 """
136 raise RuntimeError('Not implemented') 146 raise RuntimeError('Not implemented')
137 147
140 Public method used to check the project out of the vcs. 150 Public method used to check the project out of the vcs.
141 151
142 @param vcsDataDict dictionary of data required for the checkout 152 @param vcsDataDict dictionary of data required for the checkout
143 @param projectDir project directory to create (string) 153 @param projectDir project directory to create (string)
144 @param noDialog flag indicating quiet operations 154 @param noDialog flag indicating quiet operations
145 @ireturn flag indicating an execution without errors (boolean) 155 @return flag indicating an execution without errors (boolean)
146 @exception RuntimeError to indicate that this method must be 156 @exception RuntimeError to indicate that this method must be
147 implemented by a subclass 157 implemented by a subclass
148 """ 158 """
149 raise RuntimeError('Not implemented') 159 raise RuntimeError('Not implemented')
150 160
152 """ 162 """
153 Public method used to export a directory from the vcs. 163 Public method used to export a directory from the vcs.
154 164
155 @param vcsDataDict dictionary of data required for the export 165 @param vcsDataDict dictionary of data required for the export
156 @param projectDir project directory to create (string) 166 @param projectDir project directory to create (string)
157 @ireturn flag indicating an execution without errors (boolean) 167 @return flag indicating an execution without errors (boolean)
158 @exception RuntimeError to indicate that this method must be 168 @exception RuntimeError to indicate that this method must be
159 implemented by a subclass 169 implemented by a subclass
160 """ 170 """
161 raise RuntimeError('Not implemented') 171 raise RuntimeError('Not implemented')
162 172
166 the vcs. 176 the vcs.
167 177
168 @param name file/directory name to be committed (string) 178 @param name file/directory name to be committed (string)
169 @param message message for this operation (string) 179 @param message message for this operation (string)
170 @param noDialog flag indicating quiet operations (boolean) 180 @param noDialog flag indicating quiet operations (boolean)
171 @ireturn flag indicating success (boolean) 181 @return flag indicating success (boolean)
172 @exception RuntimeError to indicate that this method must be 182 @exception RuntimeError to indicate that this method must be
173 implemented by a subclass 183 implemented by a subclass
174 """ 184 """
175 raise RuntimeError('Not implemented') 185 raise RuntimeError('Not implemented')
176 186
178 """ 188 """
179 Public method used to update a file/directory in the vcs. 189 Public method used to update a file/directory in the vcs.
180 190
181 @param name file/directory name to be updated (string) 191 @param name file/directory name to be updated (string)
182 @param noDialog flag indicating quiet operations (boolean) 192 @param noDialog flag indicating quiet operations (boolean)
183 @ireturn flag indicating, that the update contained an add 193 @return flag indicating, that the update contained an add
184 or delete (boolean) 194 or delete (boolean)
185 @exception RuntimeError to indicate that this method must be 195 @exception RuntimeError to indicate that this method must be
186 implemented by a subclass 196 implemented by a subclass
187 """ 197 """
188 raise RuntimeError('Not implemented') 198 raise RuntimeError('Not implemented')
225 Public method used to add a file/directory in the vcs. 235 Public method used to add a file/directory in the vcs.
226 236
227 @param name file/directory name to be removed (string) 237 @param name file/directory name to be removed (string)
228 @param project flag indicating deletion of a project tree (boolean) 238 @param project flag indicating deletion of a project tree (boolean)
229 @param noDialog flag indicating quiet operations 239 @param noDialog flag indicating quiet operations
230 @ireturn flag indicating success (boolean) 240 @return flag indicating success (boolean)
231 @exception RuntimeError to indicate that this method must be 241 @exception RuntimeError to indicate that this method must be
232 implemented by a subclass 242 implemented by a subclass
233 """ 243 """
234 raise RuntimeError('Not implemented') 244 raise RuntimeError('Not implemented')
235 245
239 249
240 @param name file/directory name to be moved (string) 250 @param name file/directory name to be moved (string)
241 @param project reference to the project object 251 @param project reference to the project object
242 @param target new name of the file/directory (string) 252 @param target new name of the file/directory (string)
243 @param noDialog flag indicating quiet operations 253 @param noDialog flag indicating quiet operations
244 @ireturn flag indicating successfull operation (boolean) 254 @return flag indicating successfull operation (boolean)
245 @exception RuntimeError to indicate that this method must be 255 @exception RuntimeError to indicate that this method must be
246 implemented by a subclass 256 implemented by a subclass
247 """ 257 """
248 raise RuntimeError('Not implemented') 258 raise RuntimeError('Not implemented')
249 259
303 def vcsSwitch(self, name): 313 def vcsSwitch(self, name):
304 """ 314 """
305 Public method used to switch a directory to a different tag/branch. 315 Public method used to switch a directory to a different tag/branch.
306 316
307 @param name directory name to be switched (string) 317 @param name directory name to be switched (string)
308 @ireturn flag indicating, that the switch contained an add 318 @return flag indicating, that the switch contained an add
309 or delete (boolean) 319 or delete (boolean)
310 @exception RuntimeError to indicate that this method must be 320 @exception RuntimeError to indicate that this method must be
311 implemented by a subclass 321 implemented by a subclass
312 """ 322 """
313 raise RuntimeError('Not implemented') 323 raise RuntimeError('Not implemented')
325 def vcsRegisteredState(self, name): 335 def vcsRegisteredState(self, name):
326 """ 336 """
327 Public method used to get the registered state of a file in the vcs. 337 Public method used to get the registered state of a file in the vcs.
328 338
329 @param name filename to check (string) 339 @param name filename to check (string)
330 @ireturn a combination of canBeCommited and canBeAdded or 340 @return a combination of canBeCommited and canBeAdded or
331 0 in order to signal an error 341 0 in order to signal an error
332 @exception RuntimeError to indicate that this method must be 342 @exception RuntimeError to indicate that this method must be
333 implemented by a subclass 343 implemented by a subclass
334 """ 344 """
335 raise RuntimeError('Not implemented') 345 raise RuntimeError('Not implemented')
339 Public method used to get the registered states of a number of files 349 Public method used to get the registered states of a number of files
340 in the vcs. 350 in the vcs.
341 351
342 @param names dictionary with all filenames to be checked as keys 352 @param names dictionary with all filenames to be checked as keys
343 @param dname directory to check in (string) 353 @param dname directory to check in (string)
344 @ireturn the received dictionary completed with a combination of 354 @return the received dictionary completed with a combination of
345 canBeCommited and canBeAdded or None in order to signal an error 355 canBeCommited and canBeAdded or None in order to signal an error
346 @exception RuntimeError to indicate that this method must be 356 @exception RuntimeError to indicate that this method must be
347 implemented by a subclass 357 implemented by a subclass
348 """ 358 """
349 raise RuntimeError('Not implemented') 359 raise RuntimeError('Not implemented')
350 360
351 def vcsName(self): 361 def vcsName(self):
352 """ 362 """
353 Public method returning the name of the vcs. 363 Public method returning the name of the vcs.
354 364
355 @ireturn name of the vcs (string) 365 @return name of the vcs (string)
356 @exception RuntimeError to indicate that this method must be 366 @exception RuntimeError to indicate that this method must be
357 implemented by a subclass 367 implemented by a subclass
358 """ 368 """
359 raise RuntimeError('Not implemented') 369 raise RuntimeError('Not implemented')
360 370
406 def vcsRepositoryInfos(self, ppath): 416 def vcsRepositoryInfos(self, ppath):
407 """ 417 """
408 Public method to retrieve information about the repository. 418 Public method to retrieve information about the repository.
409 419
410 @param ppath local path to get the repository infos (string) 420 @param ppath local path to get the repository infos (string)
411 @ireturn string with ready formated info for display (string) 421 @return string with ready formated info for display (string)
412 @exception RuntimeError to indicate that this method must be 422 @exception RuntimeError to indicate that this method must be
413 implemented by a subclass 423 implemented by a subclass
414 """ 424 """
415 raise RuntimeError('Not implemented') 425 raise RuntimeError('Not implemented')
416 426
422 432
423 @param browser reference to the project browser object 433 @param browser reference to the project browser object
424 @param project reference to the project object 434 @param project reference to the project object
425 @param isTranslationsBrowser flag indicating, the helper is requested 435 @param isTranslationsBrowser flag indicating, the helper is requested
426 for the translations browser (this needs some special treatment) 436 for the translations browser (this needs some special treatment)
427 @ireturn the project browser helper object 437 @return the project browser helper object
428 @exception RuntimeError to indicate that this method must be 438 @exception RuntimeError to indicate that this method must be
429 implemented by a subclass 439 implemented by a subclass
430 """ 440 """
431 raise RuntimeError('Not implemented') 441 raise RuntimeError('Not implemented')
432 442
433 def vcsGetProjectHelper(self, project): 443 def vcsGetProjectHelper(self, project):
434 """ 444 """
435 Public method to instanciate a helper object for the project. 445 Public method to instanciate a helper object for the project.
436 446
437 @param project reference to the project object 447 @param project reference to the project object
438 @ireturn the project helper object 448 @return the project helper object
439 @exception RuntimeError to indicate that this method must be 449 @exception RuntimeError to indicate that this method must be
440 implemented by a subclass 450 implemented by a subclass
441 """ 451 """
442 raise RuntimeError('Not implemented') 452 raise RuntimeError('Not implemented')
443 453

eric ide

mercurial