Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3025
67064c71df21
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
101 self.menuactions.append(self.menu.addAction( 101 self.menuactions.append(self.menu.addAction(
102 self.trUtf8("Remove from Changelist"), 102 self.trUtf8("Remove from Changelist"),
103 self.__removeFromChangelist)) 103 self.__removeFromChangelist))
104 if self.vcs.version >= (1, 2, 0): 104 if self.vcs.version >= (1, 2, 0):
105 self.menu.addSeparator() 105 self.menu.addSeparator()
106 self.menuactions.append(self.menu.addAction(self.trUtf8("Lock"), 106 self.menuactions.append(self.menu.addAction(
107 self.__lock)) 107 self.trUtf8("Lock"), self.__lock))
108 self.menuactions.append(self.menu.addAction(self.trUtf8("Unlock"), 108 self.menuactions.append(self.menu.addAction(
109 self.__unlock)) 109 self.trUtf8("Unlock"), self.__unlock))
110 self.menuactions.append(self.menu.addAction( 110 self.menuactions.append(self.menu.addAction(
111 self.trUtf8("Break lock"), 111 self.trUtf8("Break lock"),
112 self.__breakLock)) 112 self.__breakLock))
113 self.menuactions.append(self.menu.addAction( 113 self.menuactions.append(self.menu.addAction(
114 self.trUtf8("Steal lock"), 114 self.trUtf8("Steal lock"),
209 209
210 def __resort(self): 210 def __resort(self):
211 """ 211 """
212 Private method to resort the tree. 212 Private method to resort the tree.
213 """ 213 """
214 self.statusList.sortItems(self.statusList.sortColumn(), 214 self.statusList.sortItems(
215 self.statusList.sortColumn(),
215 self.statusList.header().sortIndicatorOrder()) 216 self.statusList.header().sortIndicatorOrder())
216 217
217 def __resizeColumns(self): 218 def __resizeColumns(self):
218 """ 219 """
219 Private method to resize the list columns. 220 Private method to resize the list columns.
393 self.process.start('svn', args) 394 self.process.start('svn', args)
394 procStarted = self.process.waitForStarted(5000) 395 procStarted = self.process.waitForStarted(5000)
395 if not procStarted: 396 if not procStarted:
396 self.inputGroup.setEnabled(False) 397 self.inputGroup.setEnabled(False)
397 self.inputGroup.hide() 398 self.inputGroup.hide()
398 E5MessageBox.critical(self, 399 E5MessageBox.critical(
400 self,
399 self.trUtf8('Process Generation Error'), 401 self.trUtf8('Process Generation Error'),
400 self.trUtf8( 402 self.trUtf8(
401 'The process {0} could not be started. ' 403 'The process {0} could not be started. '
402 'Ensure, that it is in the search path.' 404 'Ensure, that it is in the search path.'
403 ).format('svn')) 405 ).format('svn'))
709 Private slot to handle the Commit context menu entry. 711 Private slot to handle the Commit context menu entry.
710 """ 712 """
711 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 713 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
712 for itm in self.__getCommitableItems()] 714 for itm in self.__getCommitableItems()]
713 if not names: 715 if not names:
714 E5MessageBox.information(self, 716 E5MessageBox.information(
717 self,
715 self.trUtf8("Commit"), 718 self.trUtf8("Commit"),
716 self.trUtf8("""There are no entries selected to be""" 719 self.trUtf8("""There are no entries selected to be"""
717 """ committed.""")) 720 """ committed."""))
718 return 721 return
719 722
748 Private slot to handle the Add context menu entry. 751 Private slot to handle the Add context menu entry.
749 """ 752 """
750 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 753 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
751 for itm in self.__getUnversionedItems()] 754 for itm in self.__getUnversionedItems()]
752 if not names: 755 if not names:
753 E5MessageBox.information(self, 756 E5MessageBox.information(
757 self,
754 self.trUtf8("Add"), 758 self.trUtf8("Add"),
755 self.trUtf8("""There are no unversioned entries""" 759 self.trUtf8("""There are no unversioned entries"""
756 """ available/selected.""")) 760 """ available/selected."""))
757 return 761 return
758 762
769 Private slot to handle the Revert context menu entry. 773 Private slot to handle the Revert context menu entry.
770 """ 774 """
771 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 775 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
772 for itm in self.__getModifiedItems()] 776 for itm in self.__getModifiedItems()]
773 if not names: 777 if not names:
774 E5MessageBox.information(self, 778 E5MessageBox.information(
779 self,
775 self.trUtf8("Revert"), 780 self.trUtf8("Revert"),
776 self.trUtf8("""There are no uncommitted changes""" 781 self.trUtf8("""There are no uncommitted changes"""
777 """ available/selected.""")) 782 """ available/selected."""))
778 return 783 return
779 784
792 Private slot to handle the Restore Missing context menu entry. 797 Private slot to handle the Restore Missing context menu entry.
793 """ 798 """
794 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 799 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
795 for itm in self.__getMissingItems()] 800 for itm in self.__getMissingItems()]
796 if not names: 801 if not names:
797 E5MessageBox.information(self, 802 E5MessageBox.information(
803 self,
798 self.trUtf8("Revert"), 804 self.trUtf8("Revert"),
799 self.trUtf8("""There are no missing entries""" 805 self.trUtf8("""There are no missing entries"""
800 """ available/selected.""")) 806 """ available/selected."""))
801 return 807 return
802 808
809 Private slot to handle the Diff context menu entry. 815 Private slot to handle the Diff context menu entry.
810 """ 816 """
811 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 817 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
812 for itm in self.__getModifiedItems()] 818 for itm in self.__getModifiedItems()]
813 if not names: 819 if not names:
814 E5MessageBox.information(self, 820 E5MessageBox.information(
821 self,
815 self.trUtf8("Differences"), 822 self.trUtf8("Differences"),
816 self.trUtf8("""There are no uncommitted changes""" 823 self.trUtf8("""There are no uncommitted changes"""
817 """ available/selected.""")) 824 """ available/selected."""))
818 return 825 return
819 826
829 Private slot to handle the Side-by-Side Diff context menu entry. 836 Private slot to handle the Side-by-Side Diff context menu entry.
830 """ 837 """
831 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 838 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
832 for itm in self.__getModifiedItems()] 839 for itm in self.__getModifiedItems()]
833 if not names: 840 if not names:
834 E5MessageBox.information(self, 841 E5MessageBox.information(
842 self,
835 self.trUtf8("Side-by-Side Diff"), 843 self.trUtf8("Side-by-Side Diff"),
836 self.trUtf8("""There are no uncommitted changes""" 844 self.trUtf8("""There are no uncommitted changes"""
837 """ available/selected.""")) 845 """ available/selected."""))
838 return 846 return
839 elif len(names) > 1: 847 elif len(names) > 1:
840 E5MessageBox.information(self, 848 E5MessageBox.information(
849 self,
841 self.trUtf8("Side-by-Side Diff"), 850 self.trUtf8("Side-by-Side Diff"),
842 self.trUtf8("""Only one file with uncommitted changes""" 851 self.trUtf8("""Only one file with uncommitted changes"""
843 """ must be selected.""")) 852 """ must be selected."""))
844 return 853 return
845 854
850 Private slot to handle the Lock context menu entry. 859 Private slot to handle the Lock context menu entry.
851 """ 860 """
852 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 861 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
853 for itm in self.__getLockActionItems(self.unlockedIndicators)] 862 for itm in self.__getLockActionItems(self.unlockedIndicators)]
854 if not names: 863 if not names:
855 E5MessageBox.information(self, 864 E5MessageBox.information(
865 self,
856 self.trUtf8("Lock"), 866 self.trUtf8("Lock"),
857 self.trUtf8("""There are no unlocked files""" 867 self.trUtf8("""There are no unlocked files"""
858 """ available/selected.""")) 868 """ available/selected."""))
859 return 869 return
860 870
866 Private slot to handle the Unlock context menu entry. 876 Private slot to handle the Unlock context menu entry.
867 """ 877 """
868 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 878 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
869 for itm in self.__getLockActionItems(self.lockedIndicators)] 879 for itm in self.__getLockActionItems(self.lockedIndicators)]
870 if not names: 880 if not names:
871 E5MessageBox.information(self, 881 E5MessageBox.information(
882 self,
872 self.trUtf8("Unlock"), 883 self.trUtf8("Unlock"),
873 self.trUtf8("""There are no locked files""" 884 self.trUtf8("""There are no locked files"""
874 """ available/selected.""")) 885 """ available/selected."""))
875 return 886 return
876 887
883 """ 894 """
884 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 895 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
885 for itm in self.__getLockActionItems( 896 for itm in self.__getLockActionItems(
886 self.stealBreakLockIndicators)] 897 self.stealBreakLockIndicators)]
887 if not names: 898 if not names:
888 E5MessageBox.information(self, 899 E5MessageBox.information(
900 self,
889 self.trUtf8("Break Lock"), 901 self.trUtf8("Break Lock"),
890 self.trUtf8("""There are no locked files""" 902 self.trUtf8("""There are no locked files"""
891 """ available/selected.""")) 903 """ available/selected."""))
892 return 904 return
893 905
900 """ 912 """
901 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 913 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
902 for itm in self.__getLockActionItems( 914 for itm in self.__getLockActionItems(
903 self.stealBreakLockIndicators)] 915 self.stealBreakLockIndicators)]
904 if not names: 916 if not names:
905 E5MessageBox.information(self, 917 E5MessageBox.information(
918 self,
906 self.trUtf8("Steal Lock"), 919 self.trUtf8("Steal Lock"),
907 self.trUtf8("""There are no locked files""" 920 self.trUtf8("""There are no locked files"""
908 """ available/selected.""")) 921 """ available/selected."""))
909 return 922 return
910 923
916 Private slot to add entries to a changelist. 929 Private slot to add entries to a changelist.
917 """ 930 """
918 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 931 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
919 for itm in self.__getNonChangelistItems()] 932 for itm in self.__getNonChangelistItems()]
920 if not names: 933 if not names:
921 E5MessageBox.information(self, 934 E5MessageBox.information(
935 self,
922 self.trUtf8("Remove from Changelist"), 936 self.trUtf8("Remove from Changelist"),
923 self.trUtf8( 937 self.trUtf8(
924 """There are no files available/selected not """ 938 """There are no files available/selected not """
925 """belonging to a changelist.""" 939 """belonging to a changelist."""
926 ) 940 )
934 Private slot to remove entries from their changelists. 948 Private slot to remove entries from their changelists.
935 """ 949 """
936 names = [os.path.join(self.dname, itm.text(self.__pathColumn)) 950 names = [os.path.join(self.dname, itm.text(self.__pathColumn))
937 for itm in self.__getChangelistItems()] 951 for itm in self.__getChangelistItems()]
938 if not names: 952 if not names:
939 E5MessageBox.information(self, 953 E5MessageBox.information(
954 self,
940 self.trUtf8("Remove from Changelist"), 955 self.trUtf8("Remove from Changelist"),
941 self.trUtf8( 956 self.trUtf8(
942 """There are no files available/selected belonging""" 957 """There are no files available/selected belonging"""
943 """ to a changelist.""" 958 """ to a changelist."""
944 ) 959 )

eric ide

mercurial