118 |
121 |
119 def vcsInit(self, vcsDir, noDialog=False): |
122 def vcsInit(self, vcsDir, noDialog=False): |
120 """ |
123 """ |
121 Public method used to initialize the vcs. |
124 Public method used to initialize the vcs. |
122 |
125 |
123 @param vcsDir name of the VCS directory (string) |
126 @param vcsDir name of the VCS directory |
124 @param noDialog flag indicating quiet operations (boolean) |
127 @type str |
125 @return flag indicating success (boolean) |
128 @param noDialog flag indicating quiet operations |
|
129 @type bool |
|
130 @return flag indicating success |
|
131 @rtype bool |
126 @exception NotImplementedError to indicate that this method must be |
132 @exception NotImplementedError to indicate that this method must be |
127 implemented by a subclass |
133 implemented by a subclass |
128 """ |
134 """ |
129 raise NotImplementedError("Not implemented") |
135 raise NotImplementedError("Not implemented") |
130 |
136 |
171 def vcsCheckout(self, vcsDataDict, projectDir, noDialog=False): |
177 def vcsCheckout(self, vcsDataDict, projectDir, noDialog=False): |
172 """ |
178 """ |
173 Public method used to check the project out of the vcs. |
179 Public method used to check the project out of the vcs. |
174 |
180 |
175 @param vcsDataDict dictionary of data required for the checkout |
181 @param vcsDataDict dictionary of data required for the checkout |
176 @param projectDir project directory to create (string) |
182 @type dict |
|
183 @param projectDir project directory to create |
|
184 @type str |
177 @param noDialog flag indicating quiet operations |
185 @param noDialog flag indicating quiet operations |
178 @return flag indicating an execution without errors (boolean) |
186 @type bool |
|
187 @return flag indicating an execution without errors |
|
188 @rtype bool |
179 @exception NotImplementedError to indicate that this method must be |
189 @exception NotImplementedError to indicate that this method must be |
180 implemented by a subclass |
190 implemented by a subclass |
181 """ |
191 """ |
182 raise NotImplementedError("Not implemented") |
192 raise NotImplementedError("Not implemented") |
183 |
193 |
186 def vcsExport(self, vcsDataDict, projectDir): |
196 def vcsExport(self, vcsDataDict, projectDir): |
187 """ |
197 """ |
188 Public method used to export a directory from the vcs. |
198 Public method used to export a directory from the vcs. |
189 |
199 |
190 @param vcsDataDict dictionary of data required for the export |
200 @param vcsDataDict dictionary of data required for the export |
191 @param projectDir project directory to create (string) |
201 @type dict |
192 @return flag indicating an execution without errors (boolean) |
202 @param projectDir project directory to create |
|
203 @type str |
|
204 @return flag indicating an execution without errors |
|
205 @rtype bool |
193 @exception NotImplementedError to indicate that this method must be |
206 @exception NotImplementedError to indicate that this method must be |
194 implemented by a subclass |
207 implemented by a subclass |
195 """ |
208 """ |
196 raise NotImplementedError("Not implemented") |
209 raise NotImplementedError("Not implemented") |
197 |
210 |
200 def vcsCommit(self, name, message, noDialog=False): |
213 def vcsCommit(self, name, message, noDialog=False): |
201 """ |
214 """ |
202 Public method used to make the change of a file/directory permanent in |
215 Public method used to make the change of a file/directory permanent in |
203 the vcs. |
216 the vcs. |
204 |
217 |
205 @param name file/directory name to be committed (string) |
218 @param name file/directory name to be committed |
206 @param message message for this operation (string) |
219 @type str |
207 @param noDialog flag indicating quiet operations (boolean) |
220 @param message message for this operation |
208 @return flag indicating success (boolean) |
221 @type str |
|
222 @param noDialog flag indicating quiet operations |
|
223 @type bool |
|
224 @return flag indicating success |
|
225 @rtype bool |
209 @exception NotImplementedError to indicate that this method must be |
226 @exception NotImplementedError to indicate that this method must be |
210 implemented by a subclass |
227 implemented by a subclass |
211 """ |
228 """ |
212 raise NotImplementedError("Not implemented") |
229 raise NotImplementedError("Not implemented") |
213 |
230 |
327 |
344 |
328 def vcsUpdate(self, name, noDialog=False): |
345 def vcsUpdate(self, name, noDialog=False): |
329 """ |
346 """ |
330 Public method used to update a file/directory in the vcs. |
347 Public method used to update a file/directory in the vcs. |
331 |
348 |
332 @param name file/directory name to be updated (string) |
349 @param name file/directory name to be updated |
333 @param noDialog flag indicating quiet operations (boolean) |
350 @type str |
|
351 @param noDialog flag indicating quiet operations |
|
352 @type bool |
334 @return flag indicating, that the update contained an add |
353 @return flag indicating, that the update contained an add |
335 or delete (boolean) |
354 or delete |
|
355 @rtype bool |
336 @exception NotImplementedError to indicate that this method must be |
356 @exception NotImplementedError to indicate that this method must be |
337 implemented by a subclass |
357 implemented by a subclass |
338 """ |
358 """ |
339 raise NotImplementedError("Not implemented") |
359 raise NotImplementedError("Not implemented") |
340 |
360 |
342 |
362 |
343 def vcsAdd(self, name, isDir=False, noDialog=False): |
363 def vcsAdd(self, name, isDir=False, noDialog=False): |
344 """ |
364 """ |
345 Public method used to add a file/directory in the vcs. |
365 Public method used to add a file/directory in the vcs. |
346 |
366 |
347 @param name file/directory name to be added (string) |
367 @param name file/directory name to be added |
348 @param isDir flag indicating name is a directory (boolean) |
368 @type str |
349 @param noDialog flag indicating quiet operations (boolean) |
369 @param isDir flag indicating name is a directory |
|
370 @type bool |
|
371 @param noDialog flag indicating quiet operations |
|
372 @type bool |
350 @exception NotImplementedError to indicate that this method must be |
373 @exception NotImplementedError to indicate that this method must be |
351 implemented by a subclass |
374 implemented by a subclass |
352 """ |
375 """ |
353 raise NotImplementedError("Not implemented") |
376 raise NotImplementedError("Not implemented") |
354 |
377 |
355 def vcsAddBinary(self, name, isDir=False): |
378 def vcsAddBinary(self, name, isDir=False): |
356 """ |
379 """ |
357 Public method used to add a file/directory in binary mode in the vcs. |
380 Public method used to add a file/directory in binary mode in the vcs. |
358 |
381 |
359 @param name file/directory name to be added (string) |
382 @param name file/directory name to be added |
360 @param isDir flag indicating name is a directory (boolean) |
383 @type str |
|
384 @param isDir flag indicating name is a directory |
|
385 @type bool |
361 @exception NotImplementedError to indicate that this method must be |
386 @exception NotImplementedError to indicate that this method must be |
362 implemented by a subclass |
387 implemented by a subclass |
363 """ |
388 """ |
364 raise NotImplementedError("Not implemented") |
389 raise NotImplementedError("Not implemented") |
365 |
390 |
366 def vcsAddTree(self, path): |
391 def vcsAddTree(self, path): |
367 """ |
392 """ |
368 Public method to add a directory tree rooted at path in the vcs. |
393 Public method to add a directory tree rooted at path in the vcs. |
369 |
394 |
370 @param path root directory of the tree to be added (string) |
395 @param path root directory of the tree to be added |
|
396 @type str |
371 @exception NotImplementedError to indicate that this method must be |
397 @exception NotImplementedError to indicate that this method must be |
372 implemented by a subclass |
398 implemented by a subclass |
373 """ |
399 """ |
374 raise NotImplementedError("Not implemented") |
400 raise NotImplementedError("Not implemented") |
375 |
401 |
376 def vcsRemove(self, name, project=False, noDialog=False): |
402 def vcsRemove(self, name, project=False, noDialog=False): |
377 """ |
403 """ |
378 Public method used to add a file/directory in the vcs. |
404 Public method used to add a file/directory in the vcs. |
379 |
405 |
380 @param name file/directory name to be removed (string) |
406 @param name file/directory name to be removed |
381 @param project flag indicating deletion of a project tree (boolean) |
407 @type str |
|
408 @param project flag indicating deletion of a project tree |
|
409 @type bool |
382 @param noDialog flag indicating quiet operations |
410 @param noDialog flag indicating quiet operations |
383 @return flag indicating success (boolean) |
411 @type bool |
|
412 @return flag indicating success |
|
413 @rtype bool |
384 @exception NotImplementedError to indicate that this method must be |
414 @exception NotImplementedError to indicate that this method must be |
385 implemented by a subclass |
415 implemented by a subclass |
386 """ |
416 """ |
387 raise NotImplementedError("Not implemented") |
417 raise NotImplementedError("Not implemented") |
388 |
418 |
390 |
420 |
391 def vcsMove(self, name, project, target=None, noDialog=False): |
421 def vcsMove(self, name, project, target=None, noDialog=False): |
392 """ |
422 """ |
393 Public method used to move a file/directory. |
423 Public method used to move a file/directory. |
394 |
424 |
395 @param name file/directory name to be moved (string) |
425 @param name file/directory name to be moved |
|
426 @type str |
396 @param project reference to the project object |
427 @param project reference to the project object |
397 @param target new name of the file/directory (string) |
428 @type Project |
|
429 @param target new name of the file/directory |
|
430 @type str |
398 @param noDialog flag indicating quiet operations |
431 @param noDialog flag indicating quiet operations |
399 @return flag indicating successfull operation (boolean) |
432 @type bool |
|
433 @return flag indicating successfull operation |
|
434 @rtype bool |
400 @exception NotImplementedError to indicate that this method must be |
435 @exception NotImplementedError to indicate that this method must be |
401 implemented by a subclass |
436 implemented by a subclass |
402 """ |
437 """ |
403 raise NotImplementedError("Not implemented") |
438 raise NotImplementedError("Not implemented") |
404 |
439 |
407 def vcsLogBrowser(self, name, isFile=False): |
442 def vcsLogBrowser(self, name, isFile=False): |
408 """ |
443 """ |
409 Public method used to view the log of a file/directory in the vcs |
444 Public method used to view the log of a file/directory in the vcs |
410 with a log browser dialog. |
445 with a log browser dialog. |
411 |
446 |
412 @param name file/directory name to show the log for (string) |
447 @param name file/directory name to show the log for |
|
448 @type str |
413 @param isFile flag indicating log for a file is to be shown |
449 @param isFile flag indicating log for a file is to be shown |
414 (boolean) |
450 @type bool |
415 @exception NotImplementedError to indicate that this method must be |
451 @exception NotImplementedError to indicate that this method must be |
416 implemented by a subclass |
452 implemented by a subclass |
417 """ |
453 """ |
418 raise NotImplementedError("Not implemented") |
454 raise NotImplementedError("Not implemented") |
419 |
455 |
420 def vcsDiff(self, name): |
456 def vcsDiff(self, name): |
421 """ |
457 """ |
422 Public method used to view the diff of a file/directory in the vcs. |
458 Public method used to view the diff of a file/directory in the vcs. |
423 |
459 |
424 @param name file/directory name to be diffed (string) |
460 @param name file/directory name to be diffed |
|
461 @type str |
425 @exception NotImplementedError to indicate that this method must be |
462 @exception NotImplementedError to indicate that this method must be |
426 implemented by a subclass |
463 implemented by a subclass |
427 """ |
464 """ |
428 raise NotImplementedError("Not implemented") |
465 raise NotImplementedError("Not implemented") |
429 |
466 |
445 |
482 |
446 def vcsStatus(self, name): |
483 def vcsStatus(self, name): |
447 """ |
484 """ |
448 Public method used to view the status of a file/directory in the vcs. |
485 Public method used to view the status of a file/directory in the vcs. |
449 |
486 |
450 @param name file/directory name to show the status for (string) |
487 @param name file/directory name to show the status for |
|
488 @type str |
451 @exception NotImplementedError to indicate that this method must be |
489 @exception NotImplementedError to indicate that this method must be |
452 implemented by a subclass |
490 implemented by a subclass |
453 """ |
491 """ |
454 raise NotImplementedError("Not implemented") |
492 raise NotImplementedError("Not implemented") |
455 |
493 |
456 def vcsTag(self, name): |
494 def vcsTag(self, name): |
457 """ |
495 """ |
458 Public method used to set the tag of a file/directory in the vcs. |
496 Public method used to set the tag of a file/directory in the vcs. |
459 |
497 |
460 @param name file/directory name to be tagged (string) |
498 @param name file/directory name to be tagged |
|
499 @type str |
461 @exception NotImplementedError to indicate that this method must be |
500 @exception NotImplementedError to indicate that this method must be |
462 implemented by a subclass |
501 implemented by a subclass |
463 """ |
502 """ |
464 raise NotImplementedError("Not implemented") |
503 raise NotImplementedError("Not implemented") |
465 |
504 |
492 |
531 |
493 def vcsSwitch(self, name): |
532 def vcsSwitch(self, name): |
494 """ |
533 """ |
495 Public method used to switch a directory to a different tag/branch. |
534 Public method used to switch a directory to a different tag/branch. |
496 |
535 |
497 @param name directory name to be switched (string) |
536 @param name directory name to be switched |
|
537 @type str |
498 @return flag indicating, that the switch contained an add |
538 @return flag indicating, that the switch contained an add |
499 or delete (boolean) |
539 or delete |
|
540 @rtype bool |
500 @exception NotImplementedError to indicate that this method must be |
541 @exception NotImplementedError to indicate that this method must be |
501 implemented by a subclass |
542 implemented by a subclass |
502 """ |
543 """ |
503 raise NotImplementedError("Not implemented") |
544 raise NotImplementedError("Not implemented") |
504 |
545 |
506 |
547 |
507 def vcsMerge(self, name): |
548 def vcsMerge(self, name): |
508 """ |
549 """ |
509 Public method used to merge a tag/branch into the local project. |
550 Public method used to merge a tag/branch into the local project. |
510 |
551 |
511 @param name file/directory name to be merged (string) |
552 @param name file/directory name to be merged |
|
553 @type str |
512 @exception NotImplementedError to indicate that this method must be |
554 @exception NotImplementedError to indicate that this method must be |
513 implemented by a subclass |
555 implemented by a subclass |
514 """ |
556 """ |
515 raise NotImplementedError("Not implemented") |
557 raise NotImplementedError("Not implemented") |
516 |
558 |
517 def vcsRegisteredState(self, name): |
559 def vcsRegisteredState(self, name): |
518 """ |
560 """ |
519 Public method used to get the registered state of a file in the vcs. |
561 Public method used to get the registered state of a file in the vcs. |
520 |
562 |
521 @param name filename to check (string) |
563 @param name filename to check |
|
564 @type str |
522 @return a combination of canBeCommited and canBeAdded or |
565 @return a combination of canBeCommited and canBeAdded or |
523 0 in order to signal an error |
566 0 in order to signal an error |
|
567 @rtype int |
524 @exception NotImplementedError to indicate that this method must be |
568 @exception NotImplementedError to indicate that this method must be |
525 implemented by a subclass |
569 implemented by a subclass |
526 """ |
570 """ |
527 raise NotImplementedError("Not implemented") |
571 raise NotImplementedError("Not implemented") |
528 |
572 |
532 """ |
576 """ |
533 Public method used to get the registered states of a number of files |
577 Public method used to get the registered states of a number of files |
534 in the vcs. |
578 in the vcs. |
535 |
579 |
536 @param names dictionary with all filenames to be checked as keys |
580 @param names dictionary with all filenames to be checked as keys |
537 @param dname directory to check in (string) |
581 @type dict |
|
582 @param dname directory to check in |
|
583 @type str |
538 @return the received dictionary completed with a combination of |
584 @return the received dictionary completed with a combination of |
539 canBeCommited and canBeAdded or None in order to signal an error |
585 canBeCommited and canBeAdded or None in order to signal an error |
|
586 @rtype dict |
540 @exception NotImplementedError to indicate that this method must be |
587 @exception NotImplementedError to indicate that this method must be |
541 implemented by a subclass |
588 implemented by a subclass |
542 """ |
589 """ |
543 raise NotImplementedError("Not implemented") |
590 raise NotImplementedError("Not implemented") |
544 |
591 |
558 |
606 |
559 def vcsCleanup(self, name): |
607 def vcsCleanup(self, name): |
560 """ |
608 """ |
561 Public method used to cleanup the local copy. |
609 Public method used to cleanup the local copy. |
562 |
610 |
563 @param name directory name to be cleaned up (string) |
611 @param name directory name to be cleaned up |
|
612 @type str |
564 @exception NotImplementedError to indicate that this method must be |
613 @exception NotImplementedError to indicate that this method must be |
565 implemented by a subclass |
614 implemented by a subclass |
566 """ |
615 """ |
567 raise NotImplementedError("Not implemented") |
616 raise NotImplementedError("Not implemented") |
568 |
617 |
569 def vcsCommandLine(self, name): |
618 def vcsCommandLine(self, name): |
570 """ |
619 """ |
571 Public method used to execute arbitrary vcs commands. |
620 Public method used to execute arbitrary vcs commands. |
572 |
621 |
573 @param name directory name of the working directory (string) |
622 @param name directory name of the working directory |
|
623 @type str |
574 @exception NotImplementedError to indicate that this method must be |
624 @exception NotImplementedError to indicate that this method must be |
575 implemented by a subclass |
625 implemented by a subclass |
576 """ |
626 """ |
577 raise NotImplementedError("Not implemented") |
627 raise NotImplementedError("Not implemented") |
578 |
628 |
579 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): |
629 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): |
580 """ |
630 """ |
581 Public method to get a dialog to enter repository info. |
631 Public method to get a dialog to enter repository info. |
582 |
632 |
583 @param project reference to the project object |
633 @param project reference to the project object |
584 @param archive name of the project in the repository (string) |
634 @type Project |
|
635 @param archive name of the project in the repository |
|
636 @type str |
585 @param editable flag indicating that the project name is editable |
637 @param editable flag indicating that the project name is editable |
586 (boolean) |
638 @type bool |
587 @param parent parent widget (QWidget) |
639 @param parent parent widget |
|
640 @type QWidget |
588 @exception NotImplementedError to indicate that this method must be |
641 @exception NotImplementedError to indicate that this method must be |
589 implemented by a subclass |
642 implemented by a subclass |
590 """ |
643 """ |
591 raise NotImplementedError("Not implemented") |
644 raise NotImplementedError("Not implemented") |
592 |
645 |
593 def vcsNewProjectOptionsDialog(self, parent=None): |
646 def vcsNewProjectOptionsDialog(self, parent=None): |
594 """ |
647 """ |
595 Public method to get a dialog to enter repository info for getting a |
648 Public method to get a dialog to enter repository info for getting a |
596 new project. |
649 new project. |
597 |
650 |
598 @param parent parent widget (QWidget) |
651 @param parent parent widget |
|
652 @type QWidget |
599 @exception NotImplementedError to indicate that this method must be |
653 @exception NotImplementedError to indicate that this method must be |
600 implemented by a subclass |
654 implemented by a subclass |
601 """ |
655 """ |
602 raise NotImplementedError("Not implemented") |
656 raise NotImplementedError("Not implemented") |
603 |
657 |
604 def vcsRepositoryInfos(self, ppath): |
658 def vcsRepositoryInfos(self, ppath): |
605 """ |
659 """ |
606 Public method to retrieve information about the repository. |
660 Public method to retrieve information about the repository. |
607 |
661 |
608 @param ppath local path to get the repository infos (string) |
662 @param ppath local path to get the repository infos |
609 @return string with ready formated info for display (string) |
663 @type str |
|
664 @return string with ready formated info for display |
|
665 @rtype str |
610 @exception NotImplementedError to indicate that this method must be |
666 @exception NotImplementedError to indicate that this method must be |
611 implemented by a subclass |
667 implemented by a subclass |
612 """ |
668 """ |
613 raise NotImplementedError("Not implemented") |
669 raise NotImplementedError("Not implemented") |
614 |
670 |
618 """ |
674 """ |
619 Public method to instanciate a helper object for the different |
675 Public method to instanciate a helper object for the different |
620 project browsers. |
676 project browsers. |
621 |
677 |
622 @param browser reference to the project browser object |
678 @param browser reference to the project browser object |
|
679 @type ProjectBaseBrowser |
623 @param project reference to the project object |
680 @param project reference to the project object |
|
681 @type Project |
624 @param isTranslationsBrowser flag indicating, the helper is requested |
682 @param isTranslationsBrowser flag indicating, the helper is requested |
625 for the translations browser (this needs some special treatment) |
683 for the translations browser (this needs some special treatment) |
|
684 @type bool |
626 @return the project browser helper object |
685 @return the project browser helper object |
|
686 @rtype VcsProjectBrowserHelper |
627 @exception NotImplementedError to indicate that this method must be |
687 @exception NotImplementedError to indicate that this method must be |
628 implemented by a subclass |
688 implemented by a subclass |
629 """ |
689 """ |
630 raise NotImplementedError("Not implemented") |
690 raise NotImplementedError("Not implemented") |
631 |
691 |
634 def vcsGetProjectHelper(self, project): |
694 def vcsGetProjectHelper(self, project): |
635 """ |
695 """ |
636 Public method to instanciate a helper object for the project. |
696 Public method to instanciate a helper object for the project. |
637 |
697 |
638 @param project reference to the project object |
698 @param project reference to the project object |
|
699 @type Project |
639 @return the project helper object |
700 @return the project helper object |
|
701 @rtype VcsProjectHelper |
640 @exception NotImplementedError to indicate that this method must be |
702 @exception NotImplementedError to indicate that this method must be |
641 implemented by a subclass |
703 implemented by a subclass |
642 """ |
704 """ |
643 raise NotImplementedError("Not implemented") |
705 raise NotImplementedError("Not implemented") |
644 |
706 |
659 Public method to initialize the VCS configuration. |
721 Public method to initialize the VCS configuration. |
660 |
722 |
661 This method could ensure, that certain files or directories are |
723 This method could ensure, that certain files or directories are |
662 exclude from being version controlled. |
724 exclude from being version controlled. |
663 |
725 |
664 @param project reference to the project (Project) |
726 @param project reference to the project |
|
727 @type Project |
665 """ |
728 """ |
666 pass |
729 pass |
667 |
730 |
668 def vcsSupportCommandOptions(self): |
731 def vcsSupportCommandOptions(self): |
669 """ |
732 """ |
670 Public method to signal the support of user settable command options. |
733 Public method to signal the support of user settable command options. |
671 |
734 |
672 @return flag indicating the support of user settable command options |
735 @return flag indicating the support of user settable command options |
673 (boolean) |
736 @rtype bool |
674 """ |
737 """ |
675 return True |
738 return True |
676 |
739 |
677 def vcsSetOptions(self, options): |
740 def vcsSetOptions(self, options): |
678 """ |
741 """ |
679 Public method used to set the options for the vcs. |
742 Public method used to set the options for the vcs. |
680 |
743 |
681 @param options a dictionary of option strings with keys as |
744 @param options a dictionary of option strings with keys as |
682 defined by the default options |
745 defined by the default options |
|
746 @type dict |
683 """ |
747 """ |
684 if self.vcsSupportCommandOptions(): |
748 if self.vcsSupportCommandOptions(): |
685 for key in options: |
749 for key in options: |
686 with contextlib.suppress(KeyError): |
750 with contextlib.suppress(KeyError): |
687 self.options[key] = options[key] |
751 self.options[key] = options[key] |
701 def vcsSetOtherData(self, data): |
766 def vcsSetOtherData(self, data): |
702 """ |
767 """ |
703 Public method used to set vcs specific data. |
768 Public method used to set vcs specific data. |
704 |
769 |
705 @param data a dictionary of vcs specific data |
770 @param data a dictionary of vcs specific data |
|
771 @type dict |
706 """ |
772 """ |
707 for key in data: |
773 for key in data: |
708 with contextlib.suppress(KeyError): |
774 with contextlib.suppress(KeyError): |
709 self.otherData[key] = data[key] |
775 self.otherData[key] = data[key] |
710 |
776 |
711 def vcsGetOtherData(self): |
777 def vcsGetOtherData(self): |
712 """ |
778 """ |
713 Public method used to retrieve vcs specific data. |
779 Public method used to retrieve vcs specific data. |
714 |
780 |
715 @return a dictionary of vcs specific data |
781 @return a dictionary of vcs specific data |
|
782 @rtype dict |
716 """ |
783 """ |
717 return self.otherData |
784 return self.otherData |
718 |
785 |
719 def vcsSetData(self, key, value): |
786 def vcsSetData(self, key, value): |
720 """ |
787 """ |
721 Public method used to set an entry in the otherData dictionary. |
788 Public method used to set an entry in the otherData dictionary. |
722 |
789 |
723 @param key the key of the data (string) |
790 @param key the key of the data |
|
791 @type str |
724 @param value the value of the data |
792 @param value the value of the data |
|
793 @type Any |
725 """ |
794 """ |
726 if key in self.interestingDataKeys: |
795 if key in self.interestingDataKeys: |
727 self.otherData[key] = value |
796 self.otherData[key] = value |
728 |
797 |
729 def vcsSetDataFromDict(self, dictionary): |
798 def vcsSetDataFromDict(self, dictionary): |
730 """ |
799 """ |
731 Public method used to set entries in the otherData dictionary. |
800 Public method used to set entries in the otherData dictionary. |
732 |
801 |
733 @param dictionary dictionary to pick entries from |
802 @param dictionary dictionary to pick entries from |
|
803 @type dict |
734 """ |
804 """ |
735 for key in self.interestingDataKeys: |
805 for key in self.interestingDataKeys: |
736 if key in dictionary: |
806 if key in dictionary: |
737 self.otherData[key] = dictionary[key] |
807 self.otherData[key] = dictionary[key] |
738 |
808 |
755 Public method to start a synchroneous process. |
825 Public method to start a synchroneous process. |
756 |
826 |
757 This method starts a process and waits |
827 This method starts a process and waits |
758 for its end while still serving the Qt event loop. |
828 for its end while still serving the Qt event loop. |
759 |
829 |
760 @param proc process to start (QProcess) |
830 @param proc process to start |
761 @param program path of the executable to start (string) |
831 @type QProcess |
762 @param arguments list of arguments for the process (list of strings) |
832 @param program path of the executable to start |
763 @param workingDir working directory for the process (string) |
833 @type str |
764 @return flag indicating normal exit (boolean) |
834 @param arguments list of arguments for the process |
|
835 @type list of str |
|
836 @param workingDir working directory for the process |
|
837 @type str |
|
838 @return flag indicating normal exit |
|
839 @rtype bool |
765 """ |
840 """ |
766 if proc is None: |
841 if proc is None: |
767 return False |
842 return False |
768 |
843 |
769 if workingDir: |
844 if workingDir: |
808 def splitPathList(self, names): |
885 def splitPathList(self, names): |
809 """ |
886 """ |
810 Public method splitting the list of names into a common directory part |
887 Public method splitting the list of names into a common directory part |
811 and a file list. |
888 and a file list. |
812 |
889 |
813 @param names list of paths (list of strings) |
890 @param names list of paths |
814 @return a tuple of string and list of strings (dirname, filenamelist) |
891 @type list of str |
|
892 @return tuple containing the directory name and the file name list |
|
893 @rtype tuple of (str, list of str) |
815 """ |
894 """ |
816 dname = os.path.commonprefix(names) |
895 dname = os.path.commonprefix(names) |
817 if dname: |
896 if dname: |
818 if not dname.endswith(os.sep): |
897 if not dname.endswith(os.sep): |
819 dname = os.path.dirname(dname) + os.sep |
898 dname = os.path.dirname(dname) + os.sep |
892 def startStatusMonitor(self, project): |
973 def startStatusMonitor(self, project): |
893 """ |
974 """ |
894 Public method to start the VCS status monitor thread. |
975 Public method to start the VCS status monitor thread. |
895 |
976 |
896 @param project reference to the project object |
977 @param project reference to the project object |
897 @return reference to the monitor thread (QThread) |
978 @type Project |
|
979 @return reference to the monitor thread |
|
980 @rtype QThread |
898 """ |
981 """ |
899 vcsStatusMonitorInterval = ( |
982 vcsStatusMonitorInterval = ( |
900 project.pudata["VCSSTATUSMONITORINTERVAL"] |
983 project.pudata["VCSSTATUSMONITORINTERVAL"] |
901 if project.pudata["VCSSTATUSMONITORINTERVAL"] |
984 if project.pudata["VCSSTATUSMONITORINTERVAL"] |
902 else Preferences.getVCS("StatusMonitorInterval") |
985 else Preferences.getVCS("StatusMonitorInterval") |
973 |
1058 |
974 def getStatusMonitorInterval(self): |
1059 def getStatusMonitorInterval(self): |
975 """ |
1060 """ |
976 Public method to get the monitor interval. |
1061 Public method to get the monitor interval. |
977 |
1062 |
978 @return interval in seconds (integer) |
1063 @return interval in seconds |
|
1064 @rtype int |
979 """ |
1065 """ |
980 if self.statusMonitorThread is not None: |
1066 if self.statusMonitorThread is not None: |
981 return self.statusMonitorThread.getInterval() |
1067 return self.statusMonitorThread.getInterval() |
982 else: |
1068 else: |
983 return 0 |
1069 return 0 |
984 |
1070 |
985 def setStatusMonitorAutoUpdate(self, auto): |
1071 def setStatusMonitorAutoUpdate(self, auto): |
986 """ |
1072 """ |
987 Public method to enable the auto update function. |
1073 Public method to enable the auto update function. |
988 |
1074 |
989 @param auto status of the auto update function (boolean) |
1075 @param auto status of the auto update function |
|
1076 @type bool |
990 """ |
1077 """ |
991 if self.statusMonitorThread is not None: |
1078 if self.statusMonitorThread is not None: |
992 self.statusMonitorThread.setAutoUpdate(auto) |
1079 self.statusMonitorThread.setAutoUpdate(auto) |
993 |
1080 |
994 def getStatusMonitorAutoUpdate(self): |
1081 def getStatusMonitorAutoUpdate(self): |
995 """ |
1082 """ |
996 Public method to retrieve the status of the auto update function. |
1083 Public method to retrieve the status of the auto update function. |
997 |
1084 |
998 @return status of the auto update function (boolean) |
1085 @return status of the auto update function |
|
1086 @rtype bool |
999 """ |
1087 """ |
1000 if self.statusMonitorThread is not None: |
1088 if self.statusMonitorThread is not None: |
1001 return self.statusMonitorThread.getAutoUpdate() |
1089 return self.statusMonitorThread.getAutoUpdate() |
1002 else: |
1090 else: |
1003 return False |
1091 return False |