eric7/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
7 Module implementing the shelve extension project helper. 7 Module implementing the shelve extension project helper.
8 """ 8 """
9 9
10 from PyQt6.QtWidgets import QMenu 10 from PyQt6.QtWidgets import QMenu
11 11
12 from E5Gui.E5Action import E5Action 12 from E5Gui.EricAction import EricAction
13 13
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper 14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper
15 15
16 import UI.PixmapCache 16 import UI.PixmapCache
17 17
28 28
29 def initActions(self): 29 def initActions(self):
30 """ 30 """
31 Public method to generate the action objects. 31 Public method to generate the action objects.
32 """ 32 """
33 self.hgConvertToLargefilesAct = E5Action( 33 self.hgConvertToLargefilesAct = EricAction(
34 self.tr('Convert repository to largefiles'), 34 self.tr('Convert repository to largefiles'),
35 self.tr('Convert repository to largefiles...'), 35 self.tr('Convert repository to largefiles...'),
36 0, 0, self, 'mercurial_convert_to_largefiles') 36 0, 0, self, 'mercurial_convert_to_largefiles')
37 self.hgConvertToLargefilesAct.setStatusTip(self.tr( 37 self.hgConvertToLargefilesAct.setStatusTip(self.tr(
38 'Convert the repository of the project to a largefiles repository.' 38 'Convert the repository of the project to a largefiles repository.'
45 )) 45 ))
46 self.hgConvertToLargefilesAct.triggered.connect( 46 self.hgConvertToLargefilesAct.triggered.connect(
47 lambda: self.__hgLfconvert("largefiles")) 47 lambda: self.__hgLfconvert("largefiles"))
48 self.actions.append(self.hgConvertToLargefilesAct) 48 self.actions.append(self.hgConvertToLargefilesAct)
49 49
50 self.hgConvertToNormalAct = E5Action( 50 self.hgConvertToNormalAct = EricAction(
51 self.tr('Convert repository to normal'), 51 self.tr('Convert repository to normal'),
52 self.tr('Convert repository to normal...'), 52 self.tr('Convert repository to normal...'),
53 0, 0, self, 'mercurial_convert_to_normal') 53 0, 0, self, 'mercurial_convert_to_normal')
54 self.hgConvertToNormalAct.setStatusTip(self.tr( 54 self.hgConvertToNormalAct.setStatusTip(self.tr(
55 'Convert the repository of the project to a normal repository.' 55 'Convert the repository of the project to a normal repository.'
62 )) 62 ))
63 self.hgConvertToNormalAct.triggered.connect( 63 self.hgConvertToNormalAct.triggered.connect(
64 lambda: self.__hgLfconvert("normal")) 64 lambda: self.__hgLfconvert("normal"))
65 self.actions.append(self.hgConvertToNormalAct) 65 self.actions.append(self.hgConvertToNormalAct)
66 66
67 self.hgLfPullAct = E5Action( 67 self.hgLfPullAct = EricAction(
68 self.tr('Pull Large Files'), 68 self.tr('Pull Large Files'),
69 UI.PixmapCache.getIcon("vcsUpdate"), 69 UI.PixmapCache.getIcon("vcsUpdate"),
70 self.tr('Pull Large Files'), 70 self.tr('Pull Large Files'),
71 0, 0, self, 'mercurial_pull_largefiles') 71 0, 0, self, 'mercurial_pull_largefiles')
72 self.hgLfPullAct.setStatusTip(self.tr( 72 self.hgLfPullAct.setStatusTip(self.tr(
78 """ into the local repository.</p>""" 78 """ into the local repository.</p>"""
79 )) 79 ))
80 self.hgLfPullAct.triggered.connect(self.__hgLfPull) 80 self.hgLfPullAct.triggered.connect(self.__hgLfPull)
81 self.actions.append(self.hgLfPullAct) 81 self.actions.append(self.hgLfPullAct)
82 82
83 self.hgLfSummaryAct = E5Action( 83 self.hgLfSummaryAct = EricAction(
84 self.tr('Show Summary'), 84 self.tr('Show Summary'),
85 UI.PixmapCache.getIcon("vcsSummary"), 85 UI.PixmapCache.getIcon("vcsSummary"),
86 self.tr('Show summary...'), 86 self.tr('Show summary...'),
87 0, 0, self, 'mercurial_summary_largefiles') 87 0, 0, self, 'mercurial_summary_largefiles')
88 self.hgLfSummaryAct.setStatusTip(self.tr( 88 self.hgLfSummaryAct.setStatusTip(self.tr(
94 """ directory status.</p>""" 94 """ directory status.</p>"""
95 )) 95 ))
96 self.hgLfSummaryAct.triggered.connect(self.__hgLfSummary) 96 self.hgLfSummaryAct.triggered.connect(self.__hgLfSummary)
97 self.actions.append(self.hgLfSummaryAct) 97 self.actions.append(self.hgLfSummaryAct)
98 98
99 self.hgVerifyLargeAct = E5Action( 99 self.hgVerifyLargeAct = EricAction(
100 self.tr('Verify large files of current revision'), 100 self.tr('Verify large files of current revision'),
101 self.tr('Verify large files of current revision...'), 101 self.tr('Verify large files of current revision...'),
102 0, 0, self, 'mercurial_verify_large') 102 0, 0, self, 'mercurial_verify_large')
103 self.hgVerifyLargeAct.setStatusTip(self.tr( 103 self.hgVerifyLargeAct.setStatusTip(self.tr(
104 'Verify that all large files in the current revision exist' 104 'Verify that all large files in the current revision exist'
110 )) 110 ))
111 self.hgVerifyLargeAct.triggered.connect( 111 self.hgVerifyLargeAct.triggered.connect(
112 lambda: self.__hgLfVerify("large")) 112 lambda: self.__hgLfVerify("large"))
113 self.actions.append(self.hgVerifyLargeAct) 113 self.actions.append(self.hgVerifyLargeAct)
114 114
115 self.hgVerifyLfaAct = E5Action( 115 self.hgVerifyLfaAct = EricAction(
116 self.tr('Verify large files of all revision'), 116 self.tr('Verify large files of all revision'),
117 self.tr('Verify large files of all revision...'), 117 self.tr('Verify large files of all revision...'),
118 0, 0, self, 'mercurial_verify_lfa') 118 0, 0, self, 'mercurial_verify_lfa')
119 self.hgVerifyLfaAct.setStatusTip(self.tr( 119 self.hgVerifyLfaAct.setStatusTip(self.tr(
120 'Verify that all large files in all revisions exist' 120 'Verify that all large files in all revisions exist'
126 )) 126 ))
127 self.hgVerifyLfaAct.triggered.connect( 127 self.hgVerifyLfaAct.triggered.connect(
128 lambda: self.__hgLfVerify("lfa")) 128 lambda: self.__hgLfVerify("lfa"))
129 self.actions.append(self.hgVerifyLfaAct) 129 self.actions.append(self.hgVerifyLfaAct)
130 130
131 self.hgVerifyLfcAct = E5Action( 131 self.hgVerifyLfcAct = EricAction(
132 self.tr('Verify large files contents'), 132 self.tr('Verify large files contents'),
133 self.tr('Verify large files contents...'), 133 self.tr('Verify large files contents...'),
134 0, 0, self, 'mercurial_verify_lfc') 134 0, 0, self, 'mercurial_verify_lfc')
135 self.hgVerifyLfcAct.setStatusTip(self.tr( 135 self.hgVerifyLfcAct.setStatusTip(self.tr(
136 'Verify the contents of all large files' 136 'Verify the contents of all large files'

eric ide

mercurial