Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3024
17c01303a239
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
103 self.menuactions.append(self.menu.addAction( 103 self.menuactions.append(self.menu.addAction(
104 self.trUtf8("Remove from Changelist"), 104 self.trUtf8("Remove from Changelist"),
105 self.__removeFromChangelist)) 105 self.__removeFromChangelist))
106 if self.vcs.version >= (1, 2, 0): 106 if self.vcs.version >= (1, 2, 0):
107 self.menu.addSeparator() 107 self.menu.addSeparator()
108 self.menuactions.append(self.menu.addAction(self.trUtf8("Lock"), 108 self.menuactions.append(
109 self.__lock)) 109 self.menu.addAction(self.trUtf8("Lock"), self.__lock))
110 self.menuactions.append(self.menu.addAction(self.trUtf8("Unlock"), 110 self.menuactions.append(
111 self.__unlock)) 111 self.menu.addAction(self.trUtf8("Unlock"), self.__unlock))
112 self.menuactions.append(self.menu.addAction( 112 self.menuactions.append(self.menu.addAction(
113 self.trUtf8("Break lock"), 113 self.trUtf8("Break lock"),
114 self.__breakLock)) 114 self.__breakLock))
115 self.menuactions.append(self.menu.addAction( 115 self.menuactions.append(self.menu.addAction(
116 self.trUtf8("Steal lock"), 116 self.trUtf8("Steal lock"),
179 179
180 def __resort(self): 180 def __resort(self):
181 """ 181 """
182 Private method to resort the tree. 182 Private method to resort the tree.
183 """ 183 """
184 self.statusList.sortItems(self.statusList.sortColumn(), 184 self.statusList.sortItems(
185 self.statusList.sortColumn(),
185 self.statusList.header().sortIndicatorOrder()) 186 self.statusList.header().sortIndicatorOrder())
186 187
187 def __resizeColumns(self): 188 def __resizeColumns(self):
188 """ 189 """
189 Private method to resize the list columns. 190 Private method to resize the list columns.
596 Private slot to handle the Commit context menu entry. 597 Private slot to handle the Commit context menu entry.
597 """ 598 """
598 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 599 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
599 for itm in self.__getCommitableItems()] 600 for itm in self.__getCommitableItems()]
600 if not names: 601 if not names:
601 E5MessageBox.information(self, 602 E5MessageBox.information(
603 self,
602 self.trUtf8("Commit"), 604 self.trUtf8("Commit"),
603 self.trUtf8("""There are no entries selected to be""" 605 self.trUtf8("""There are no entries selected to be"""
604 """ committed.""")) 606 """ committed."""))
605 return 607 return
606 608
635 Private slot to handle the Add context menu entry. 637 Private slot to handle the Add context menu entry.
636 """ 638 """
637 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 639 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
638 for itm in self.__getUnversionedItems()] 640 for itm in self.__getUnversionedItems()]
639 if not names: 641 if not names:
640 E5MessageBox.information(self, 642 E5MessageBox.information(
643 self,
641 self.trUtf8("Add"), 644 self.trUtf8("Add"),
642 self.trUtf8("""There are no unversioned entries""" 645 self.trUtf8("""There are no unversioned entries"""
643 """ available/selected.""")) 646 """ available/selected."""))
644 return 647 return
645 648
656 Private slot to handle the Revert context menu entry. 659 Private slot to handle the Revert context menu entry.
657 """ 660 """
658 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 661 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
659 for itm in self.__getModifiedItems()] 662 for itm in self.__getModifiedItems()]
660 if not names: 663 if not names:
661 E5MessageBox.information(self, 664 E5MessageBox.information(
665 self,
662 self.trUtf8("Revert"), 666 self.trUtf8("Revert"),
663 self.trUtf8("""There are no uncommitted changes""" 667 self.trUtf8("""There are no uncommitted changes"""
664 """ available/selected.""")) 668 """ available/selected."""))
665 return 669 return
666 670
679 Private slot to handle the Restore Missing context menu entry. 683 Private slot to handle the Restore Missing context menu entry.
680 """ 684 """
681 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 685 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
682 for itm in self.__getMissingItems()] 686 for itm in self.__getMissingItems()]
683 if not names: 687 if not names:
684 E5MessageBox.information(self, 688 E5MessageBox.information(
689 self,
685 self.trUtf8("Revert"), 690 self.trUtf8("Revert"),
686 self.trUtf8("""There are no missing entries""" 691 self.trUtf8("""There are no missing entries"""
687 """ available/selected.""")) 692 """ available/selected."""))
688 return 693 return
689 694
696 Private slot to handle the Diff context menu entry. 701 Private slot to handle the Diff context menu entry.
697 """ 702 """
698 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 703 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
699 for itm in self.__getModifiedItems()] 704 for itm in self.__getModifiedItems()]
700 if not names: 705 if not names:
701 E5MessageBox.information(self, 706 E5MessageBox.information(
707 self,
702 self.trUtf8("Differences"), 708 self.trUtf8("Differences"),
703 self.trUtf8("""There are no uncommitted changes""" 709 self.trUtf8("""There are no uncommitted changes"""
704 """ available/selected.""")) 710 """ available/selected."""))
705 return 711 return
706 712
716 Private slot to handle the Side-by-Side Diff context menu entry. 722 Private slot to handle the Side-by-Side Diff context menu entry.
717 """ 723 """
718 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 724 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
719 for itm in self.__getModifiedItems()] 725 for itm in self.__getModifiedItems()]
720 if not names: 726 if not names:
721 E5MessageBox.information(self, 727 E5MessageBox.information(
728 self,
722 self.trUtf8("Side-by-Side Diff"), 729 self.trUtf8("Side-by-Side Diff"),
723 self.trUtf8("""There are no uncommitted changes""" 730 self.trUtf8("""There are no uncommitted changes"""
724 """ available/selected.""")) 731 """ available/selected."""))
725 return 732 return
726 elif len(names) > 1: 733 elif len(names) > 1:
727 E5MessageBox.information(self, 734 E5MessageBox.information(
735 self,
728 self.trUtf8("Side-by-Side Diff"), 736 self.trUtf8("Side-by-Side Diff"),
729 self.trUtf8("""Only one file with uncommitted changes""" 737 self.trUtf8("""Only one file with uncommitted changes"""
730 """ must be selected.""")) 738 """ must be selected."""))
731 return 739 return
732 740
737 Private slot to handle the Lock context menu entry. 745 Private slot to handle the Lock context menu entry.
738 """ 746 """
739 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 747 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
740 for itm in self.__getLockActionItems(self.unlockedIndicators)] 748 for itm in self.__getLockActionItems(self.unlockedIndicators)]
741 if not names: 749 if not names:
742 E5MessageBox.information(self, 750 E5MessageBox.information(
751 self,
743 self.trUtf8("Lock"), 752 self.trUtf8("Lock"),
744 self.trUtf8("""There are no unlocked files""" 753 self.trUtf8("""There are no unlocked files"""
745 """ available/selected.""")) 754 """ available/selected."""))
746 return 755 return
747 756
753 Private slot to handle the Unlock context menu entry. 762 Private slot to handle the Unlock context menu entry.
754 """ 763 """
755 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 764 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
756 for itm in self.__getLockActionItems(self.lockedIndicators)] 765 for itm in self.__getLockActionItems(self.lockedIndicators)]
757 if not names: 766 if not names:
758 E5MessageBox.information(self, 767 E5MessageBox.information(
768 self,
759 self.trUtf8("Unlock"), 769 self.trUtf8("Unlock"),
760 self.trUtf8("""There are no locked files""" 770 self.trUtf8("""There are no locked files"""
761 """ available/selected.""")) 771 """ available/selected."""))
762 return 772 return
763 773
770 """ 780 """
771 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 781 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
772 for itm in self.__getLockActionItems( 782 for itm in self.__getLockActionItems(
773 self.stealBreakLockIndicators)] 783 self.stealBreakLockIndicators)]
774 if not names: 784 if not names:
775 E5MessageBox.information(self, 785 E5MessageBox.information(
786 self,
776 self.trUtf8("Break Lock"), 787 self.trUtf8("Break Lock"),
777 self.trUtf8("""There are no locked files""" 788 self.trUtf8("""There are no locked files"""
778 """ available/selected.""")) 789 """ available/selected."""))
779 return 790 return
780 791
787 """ 798 """
788 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 799 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
789 for itm in self.__getLockActionItems( 800 for itm in self.__getLockActionItems(
790 self.stealBreakLockIndicators)] 801 self.stealBreakLockIndicators)]
791 if not names: 802 if not names:
792 E5MessageBox.information(self, 803 E5MessageBox.information(
804 self,
793 self.trUtf8("Steal Lock"), 805 self.trUtf8("Steal Lock"),
794 self.trUtf8("""There are no locked files""" 806 self.trUtf8("""There are no locked files"""
795 """ available/selected.""")) 807 """ available/selected."""))
796 return 808 return
797 809
803 Private slot to add entries to a changelist. 815 Private slot to add entries to a changelist.
804 """ 816 """
805 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 817 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
806 for itm in self.__getNonChangelistItems()] 818 for itm in self.__getNonChangelistItems()]
807 if not names: 819 if not names:
808 E5MessageBox.information(self, 820 E5MessageBox.information(
821 self,
809 self.trUtf8("Remove from Changelist"), 822 self.trUtf8("Remove from Changelist"),
810 self.trUtf8( 823 self.trUtf8(
811 """There are no files available/selected not """ 824 """There are no files available/selected not """
812 """belonging to a changelist.""" 825 """belonging to a changelist."""
813 ) 826 )
821 Private slot to remove entries from their changelists. 834 Private slot to remove entries from their changelists.
822 """ 835 """
823 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \ 836 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
824 for itm in self.__getChangelistItems()] 837 for itm in self.__getChangelistItems()]
825 if not names: 838 if not names:
826 E5MessageBox.information(self, 839 E5MessageBox.information(
840 self,
827 self.trUtf8("Remove from Changelist"), 841 self.trUtf8("Remove from Changelist"),
828 self.trUtf8( 842 self.trUtf8(
829 """There are no files available/selected belonging""" 843 """There are no files available/selected belonging"""
830 """ to a changelist.""" 844 """ to a changelist."""
831 ) 845 )

eric ide

mercurial