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

Wed, 13 Jul 2022 14:55:47 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 13 Jul 2022 14:55:47 +0200
branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
permissions
-rw-r--r--

Reformatted the source code using the 'Black' utility.

3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
8881
54e42bc2437a Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8358
diff changeset
3 # Copyright (c) 2014 - 2022 Detlev Offenbach <detlev@die-offenbachs.de>
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the shelve extension project helper.
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
10 from PyQt6.QtWidgets import QMenu
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
8358
144a6b854f70 Sorted the eric specific extensions into packages named like the corresponding PyQt packages (i.e. EricCore,EricGui and EricWidgets).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8356
diff changeset
12 from EricGui.EricAction import EricAction
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
16 import UI.PixmapCache
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
17
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 class LargefilesProjectHelper(HgExtensionProjectHelper):
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 Class implementing the queues extension project helper.
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
23
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 def __init__(self):
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 Constructor
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
8218
7c09585bd960 Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7971
diff changeset
28 super().__init__()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
29
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def initActions(self):
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Public method to generate the action objects.
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
34 self.hgConvertToLargefilesAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
35 self.tr("Convert repository to largefiles"),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
36 self.tr("Convert repository to largefiles..."),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
37 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
38 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
39 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
40 "mercurial_convert_to_largefiles",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
41 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
42 self.hgConvertToLargefilesAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
43 self.tr("Convert the repository of the project to a largefiles repository.")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
44 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
45 self.hgConvertToLargefilesAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
46 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
47 """<b>Convert repository to largefiles</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
48 """<p>This converts the repository of the project to a"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
49 """ largefiles repository. A new project is created. The"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
50 """ current one is kept as a backup.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
51 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
52 )
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3315
diff changeset
53 self.hgConvertToLargefilesAct.triggered.connect(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
54 lambda: self.__hgLfconvert("largefiles")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
55 )
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 self.actions.append(self.hgConvertToLargefilesAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
57
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
58 self.hgConvertToNormalAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
59 self.tr("Convert repository to normal"),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
60 self.tr("Convert repository to normal..."),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
61 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
62 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
63 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
64 "mercurial_convert_to_normal",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
65 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
66 self.hgConvertToNormalAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
67 self.tr("Convert the repository of the project to a normal repository.")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
68 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
69 self.hgConvertToNormalAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
70 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
71 """<b>Convert repository to normal</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
72 """<p>This converts the repository of the project to a"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
73 """ normal repository. A new project is created. The current"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
74 """ one is kept as a backup.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
75 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
76 )
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3315
diff changeset
77 self.hgConvertToNormalAct.triggered.connect(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
78 lambda: self.__hgLfconvert("normal")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
79 )
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 self.actions.append(self.hgConvertToNormalAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
81
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
82 self.hgLfPullAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
83 self.tr("Pull Large Files"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
84 UI.PixmapCache.getIcon("vcsUpdate"),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
85 self.tr("Pull Large Files"),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
86 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
87 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
88 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
89 "mercurial_pull_largefiles",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
90 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
91 self.hgLfPullAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
92 self.tr("Pull large files from a remote repository")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
93 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
94 self.hgLfPullAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
95 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
96 """<b>Pull Large Files</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
97 """<p>This pulls missing large files from a remote repository"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
98 """ into the local repository.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
99 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
100 )
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3315
diff changeset
101 self.hgLfPullAct.triggered.connect(self.__hgLfPull)
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
102 self.actions.append(self.hgLfPullAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
103
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
104 self.hgLfSummaryAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
105 self.tr("Show Summary"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
106 UI.PixmapCache.getIcon("vcsSummary"),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
107 self.tr("Show summary..."),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
108 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
109 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
110 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
111 "mercurial_summary_largefiles",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
112 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
113 self.hgLfSummaryAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
114 self.tr("Show summary information of the working directory status")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
116 self.hgLfSummaryAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
117 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
118 """<b>Show summary</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119 """<p>This shows some summary information of the working"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
120 """ directory status.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
121 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
122 )
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3315
diff changeset
123 self.hgLfSummaryAct.triggered.connect(self.__hgLfSummary)
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
124 self.actions.append(self.hgLfSummaryAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
125
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
126 self.hgVerifyLargeAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
127 self.tr("Verify large files of current revision"),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
128 self.tr("Verify large files of current revision..."),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
129 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
130 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
131 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
132 "mercurial_verify_large",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
133 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
134 self.hgVerifyLargeAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
135 self.tr("Verify that all large files in the current revision exist")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
136 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
137 self.hgVerifyLargeAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
138 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
139 """<b>Verify large files of current revision</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
140 """<p>This verifies that all large files in the current"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
141 """ revision exist.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
142 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
143 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
144 self.hgVerifyLargeAct.triggered.connect(lambda: self.__hgLfVerify("large"))
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
145 self.actions.append(self.hgVerifyLargeAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
146
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
147 self.hgVerifyLfaAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
148 self.tr("Verify large files of all revision"),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
149 self.tr("Verify large files of all revision..."),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
150 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
151 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
152 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
153 "mercurial_verify_lfa",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
154 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
155 self.hgVerifyLfaAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
156 self.tr("Verify that all large files in all revisions exist")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
157 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
158 self.hgVerifyLfaAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
159 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
160 """<b>Verify large files of all revision</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
161 """<p>This verifies that all large files in all"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
162 """ revisions exist.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
163 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
164 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
165 self.hgVerifyLfaAct.triggered.connect(lambda: self.__hgLfVerify("lfa"))
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
166 self.actions.append(self.hgVerifyLfaAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
167
8356
68ec9c3d4de5 Renamed the modules and classes of the E5Gui package to have the prefix 'Eric' instead of 'E5'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
168 self.hgVerifyLfcAct = EricAction(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
169 self.tr("Verify large files contents"),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
170 self.tr("Verify large files contents..."),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
171 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
172 0,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
173 self,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
174 "mercurial_verify_lfc",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
175 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
176 self.hgVerifyLfcAct.setStatusTip(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
177 self.tr("Verify the contents of all large files")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
178 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
179 self.hgVerifyLfcAct.setWhatsThis(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
180 self.tr(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
181 """<b>Verify large files contents</b>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
182 """<p>This verifies the contents of all large files.</p>"""
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
183 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
184 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
185 self.hgVerifyLfcAct.triggered.connect(lambda: self.__hgLfVerify("lfc"))
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
186 self.actions.append(self.hgVerifyLfcAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
187
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 def initMenu(self, mainMenu):
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 Public method to generate the extension menu.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
191
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 @param mainMenu reference to the main menu (QMenu)
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 @return populated menu (QMenu)
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 menu = QMenu(self.menuTitle(), mainMenu)
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 menu.setTearOffEnabled(True)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
197
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
198 self.__adminMenu = QMenu(self.tr("Administration"), menu)
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
199 self.__adminMenu.setTearOffEnabled(True)
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
200 self.__adminMenu.addAction(self.hgVerifyLargeAct)
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
201 self.__adminMenu.addAction(self.hgVerifyLfaAct)
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
202 self.__adminMenu.addAction(self.hgVerifyLfcAct)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
203
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 menu.addAction(self.hgConvertToLargefilesAct)
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 menu.addAction(self.hgConvertToNormalAct)
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
206 menu.addSeparator()
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
207 menu.addAction(self.hgLfPullAct)
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
208 menu.addSeparator()
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
209 menu.addAction(self.hgLfSummaryAct)
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
210 menu.addSeparator()
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
211 menu.addMenu(self.__adminMenu)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
212
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 return menu
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
214
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 def menuTitle(self):
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 Public method to get the menu title.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
218
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 @return title of the menu (string)
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 return self.tr("Large Files")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
222
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
223 def shutdown(self):
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
224 """
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
225 Public method to perform shutdown actions.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
226
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
227 Note: Derived class may implement this method if needed.
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
228 """
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
229 if self.__adminMenu.isTearOffMenuVisible():
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
230 self.__adminMenu.hideTearOffMenu()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
231
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 def __hgLfconvert(self, direction):
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 """
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 Private slot to convert the repository format of the current project.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
235
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
236 @param direction direction of the conversion (string; one of
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 'largefiles' or 'normal')
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
238 @exception ValueError raised to indicate a bad value for the
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
239 'direction' parameter.
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 """
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
241 if direction not in ["largefiles", "normal"]:
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
242 raise ValueError("Bad value for 'direction' parameter.")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
243
3310
a2032ed66aec Started implementing the Mercurial lfconvert functionality.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 self.vcs.getExtensionObject("largefiles").hgLfconvert(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
245 direction, self.project.getProjectFile()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
246 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
247
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
248 def __hgLfPull(self):
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
249 """
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
250 Private slot to pull missing large files into the local repository.
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
251 """
7970
c4ee8a81584c Mercurial: started more code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
252 self.vcs.getExtensionObject("largefiles").hgLfPull()
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
253
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
254 def __hgLfSummary(self):
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
255 """
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
256 Private slot to show a working directory summary.
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
257 """
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
258 self.vcs.hgSummary(largefiles=True)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
259
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
260 def __hgLfVerify(self, mode):
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
261 """
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
262 Private slot to verify large files integrity.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
263
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
264 @param mode verify mode (string; one of 'large', 'lfa' or 'lfc')
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
265 @exception ValueError raised to indicate a bad value for the
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
266 'mode' parameter.
3315
bd1a25ead18d Continued implementing support for Mercurial largefiles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3310
diff changeset
267 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
268 if mode not in ["large", "lfa", "lfc"]:
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
269 raise ValueError("Bad value for 'mode' parameter.")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
270
7971
ff2971513d6d Mercurial: completed more code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7970
diff changeset
271 self.vcs.getExtensionObject("largefiles").hgLfVerify(mode)

eric ide

mercurial