|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsGit.GitWorktreeDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Plugins.VcsPlugins.vcsGit.GitWorktreeDialog</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a dialog to offer the worktree management functionality. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#GitWorktreeDialog">GitWorktreeDialog</a></td> |
|
25 <td>Class implementing a dialog to offer the worktree management functionality.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="GitWorktreeDialog" ID="GitWorktreeDialog"></a> |
|
36 <h2>GitWorktreeDialog</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a dialog to offer the worktree management functionality. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 QWidget, Ui_GitWorktreeDialog |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>StatusRole</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#GitWorktreeDialog.__init__">GitWorktreeDialog</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#GitWorktreeDialog.__finish">__finish</a></td> |
|
63 <td>Private slot called when the process finished or the user pressed the button.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#GitWorktreeDialog.__generateItem">__generateItem</a></td> |
|
67 <td>Private method to generate a worktree entry with the given data.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#GitWorktreeDialog.__initActionsMenu">__initActionsMenu</a></td> |
|
71 <td>Private method to initialize the actions menu.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#GitWorktreeDialog.__procFinished">__procFinished</a></td> |
|
75 <td>Private slot connected to the finished signal.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#GitWorktreeDialog.__readStderr">__readStderr</a></td> |
|
79 <td>Private slot to handle the readyReadStandardError signal.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#GitWorktreeDialog.__readStdout">__readStdout</a></td> |
|
83 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#GitWorktreeDialog.__refreshButtonClicked">__refreshButtonClicked</a></td> |
|
87 <td>Private slot to refresh the worktree display.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#GitWorktreeDialog.__resizeColumns">__resizeColumns</a></td> |
|
91 <td>Private method to resize the list columns.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#GitWorktreeDialog.__resort">__resort</a></td> |
|
95 <td>Private method to resort the tree.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#GitWorktreeDialog.__showActionsMenu">__showActionsMenu</a></td> |
|
99 <td>Private slot to prepare the actions button menu before it is shown.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#GitWorktreeDialog.__worktreeAdd">__worktreeAdd</a></td> |
|
103 <td>Private slot to add a linked worktree.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#GitWorktreeDialog.__worktreeLock">__worktreeLock</a></td> |
|
107 <td>Private slot to lock a worktree.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#GitWorktreeDialog.__worktreeMove">__worktreeMove</a></td> |
|
111 <td>Private slot to move a worktree to a new location.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#GitWorktreeDialog.__worktreePrune">__worktreePrune</a></td> |
|
115 <td>Private slot to prune worktree information.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#GitWorktreeDialog.__worktreeRemove">__worktreeRemove</a></td> |
|
119 <td>Private slot to remove a linked worktree.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#GitWorktreeDialog.__worktreeRemoveForced">__worktreeRemoveForced</a></td> |
|
123 <td>Private slot to remove a linked worktree forcefully.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#GitWorktreeDialog.__worktreeRepair">__worktreeRepair</a></td> |
|
127 <td>Private slot to repair worktree administrative files.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#GitWorktreeDialog.__worktreeRepairMultiple">__worktreeRepairMultiple</a></td> |
|
131 <td>Private slot to repair worktree administrative files for multiple worktree paths.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#GitWorktreeDialog.__worktreeUnlock">__worktreeUnlock</a></td> |
|
135 <td>Private slot to unlock a worktree.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#GitWorktreeDialog.closeEvent">closeEvent</a></td> |
|
139 <td>Protected slot implementing a close event handler.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#GitWorktreeDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
143 <td>Private slot called by a button of the button box clicked.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#GitWorktreeDialog.on_expireCheckBox_toggled">on_expireCheckBox_toggled</a></td> |
|
147 <td>Private slot to handle a change of the expire checkbox.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#GitWorktreeDialog.on_expireDateTimeEdit_dateTimeChanged">on_expireDateTimeEdit_dateTimeChanged</a></td> |
|
151 <td>Private slot to handle a change of the expire date and time.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#GitWorktreeDialog.show">show</a></td> |
|
155 <td>Public slot to show the dialog.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#GitWorktreeDialog.start">start</a></td> |
|
159 <td>Public slot to start the git worktree list command.</td> |
|
160 </tr> |
|
161 </table> |
|
162 <h3>Static Methods</h3> |
|
163 |
|
164 <table> |
|
165 <tr><td>None</td></tr> |
|
166 </table> |
|
167 |
|
168 <a NAME="GitWorktreeDialog.__init__" ID="GitWorktreeDialog.__init__"></a> |
|
169 <h4>GitWorktreeDialog (Constructor)</h4> |
|
170 <b>GitWorktreeDialog</b>(<i>vcs, parent=None</i>) |
|
171 |
|
172 <p> |
|
173 Constructor |
|
174 </p> |
|
175 <dl> |
|
176 |
|
177 <dt><i>vcs</i> (Git)</dt> |
|
178 <dd> |
|
179 reference to the vcs object |
|
180 </dd> |
|
181 <dt><i>parent</i> (QWidget (optional))</dt> |
|
182 <dd> |
|
183 reference to the parent widget (defaults to None) |
|
184 </dd> |
|
185 </dl> |
|
186 <a NAME="GitWorktreeDialog.__finish" ID="GitWorktreeDialog.__finish"></a> |
|
187 <h4>GitWorktreeDialog.__finish</h4> |
|
188 <b>__finish</b>(<i></i>) |
|
189 |
|
190 <p> |
|
191 Private slot called when the process finished or the user pressed |
|
192 the button. |
|
193 </p> |
|
194 <a NAME="GitWorktreeDialog.__generateItem" ID="GitWorktreeDialog.__generateItem"></a> |
|
195 <h4>GitWorktreeDialog.__generateItem</h4> |
|
196 <b>__generateItem</b>(<i>dataLines</i>) |
|
197 |
|
198 <p> |
|
199 Private method to generate a worktree entry with the given data. |
|
200 </p> |
|
201 <dl> |
|
202 |
|
203 <dt><i>dataLines</i> (list of str)</dt> |
|
204 <dd> |
|
205 lines extracted from the git worktree list output |
|
206 with porcelain format |
|
207 </dd> |
|
208 </dl> |
|
209 <a NAME="GitWorktreeDialog.__initActionsMenu" ID="GitWorktreeDialog.__initActionsMenu"></a> |
|
210 <h4>GitWorktreeDialog.__initActionsMenu</h4> |
|
211 <b>__initActionsMenu</b>(<i></i>) |
|
212 |
|
213 <p> |
|
214 Private method to initialize the actions menu. |
|
215 </p> |
|
216 <a NAME="GitWorktreeDialog.__procFinished" ID="GitWorktreeDialog.__procFinished"></a> |
|
217 <h4>GitWorktreeDialog.__procFinished</h4> |
|
218 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
|
219 |
|
220 <p> |
|
221 Private slot connected to the finished signal. |
|
222 </p> |
|
223 <dl> |
|
224 |
|
225 <dt><i>exitCode</i></dt> |
|
226 <dd> |
|
227 exit code of the process (integer) |
|
228 </dd> |
|
229 <dt><i>exitStatus</i></dt> |
|
230 <dd> |
|
231 exit status of the process (QProcess.ExitStatus) |
|
232 </dd> |
|
233 </dl> |
|
234 <a NAME="GitWorktreeDialog.__readStderr" ID="GitWorktreeDialog.__readStderr"></a> |
|
235 <h4>GitWorktreeDialog.__readStderr</h4> |
|
236 <b>__readStderr</b>(<i></i>) |
|
237 |
|
238 <p> |
|
239 Private slot to handle the readyReadStandardError signal. |
|
240 </p> |
|
241 <p> |
|
242 It reads the error output of the process and inserts it into the |
|
243 error pane. |
|
244 </p> |
|
245 <a NAME="GitWorktreeDialog.__readStdout" ID="GitWorktreeDialog.__readStdout"></a> |
|
246 <h4>GitWorktreeDialog.__readStdout</h4> |
|
247 <b>__readStdout</b>(<i></i>) |
|
248 |
|
249 <p> |
|
250 Private slot to handle the readyReadStandardOutput signal. |
|
251 </p> |
|
252 <p> |
|
253 It reads the output of the process, formats it and inserts it into |
|
254 the contents pane. |
|
255 </p> |
|
256 <a NAME="GitWorktreeDialog.__refreshButtonClicked" ID="GitWorktreeDialog.__refreshButtonClicked"></a> |
|
257 <h4>GitWorktreeDialog.__refreshButtonClicked</h4> |
|
258 <b>__refreshButtonClicked</b>(<i></i>) |
|
259 |
|
260 <p> |
|
261 Private slot to refresh the worktree display. |
|
262 </p> |
|
263 <a NAME="GitWorktreeDialog.__resizeColumns" ID="GitWorktreeDialog.__resizeColumns"></a> |
|
264 <h4>GitWorktreeDialog.__resizeColumns</h4> |
|
265 <b>__resizeColumns</b>(<i></i>) |
|
266 |
|
267 <p> |
|
268 Private method to resize the list columns. |
|
269 </p> |
|
270 <a NAME="GitWorktreeDialog.__resort" ID="GitWorktreeDialog.__resort"></a> |
|
271 <h4>GitWorktreeDialog.__resort</h4> |
|
272 <b>__resort</b>(<i></i>) |
|
273 |
|
274 <p> |
|
275 Private method to resort the tree. |
|
276 </p> |
|
277 <a NAME="GitWorktreeDialog.__showActionsMenu" ID="GitWorktreeDialog.__showActionsMenu"></a> |
|
278 <h4>GitWorktreeDialog.__showActionsMenu</h4> |
|
279 <b>__showActionsMenu</b>(<i></i>) |
|
280 |
|
281 <p> |
|
282 Private slot to prepare the actions button menu before it is shown. |
|
283 </p> |
|
284 <a NAME="GitWorktreeDialog.__worktreeAdd" ID="GitWorktreeDialog.__worktreeAdd"></a> |
|
285 <h4>GitWorktreeDialog.__worktreeAdd</h4> |
|
286 <b>__worktreeAdd</b>(<i></i>) |
|
287 |
|
288 <p> |
|
289 Private slot to add a linked worktree. |
|
290 </p> |
|
291 <a NAME="GitWorktreeDialog.__worktreeLock" ID="GitWorktreeDialog.__worktreeLock"></a> |
|
292 <h4>GitWorktreeDialog.__worktreeLock</h4> |
|
293 <b>__worktreeLock</b>(<i></i>) |
|
294 |
|
295 <p> |
|
296 Private slot to lock a worktree. |
|
297 </p> |
|
298 <a NAME="GitWorktreeDialog.__worktreeMove" ID="GitWorktreeDialog.__worktreeMove"></a> |
|
299 <h4>GitWorktreeDialog.__worktreeMove</h4> |
|
300 <b>__worktreeMove</b>(<i></i>) |
|
301 |
|
302 <p> |
|
303 Private slot to move a worktree to a new location. |
|
304 </p> |
|
305 <a NAME="GitWorktreeDialog.__worktreePrune" ID="GitWorktreeDialog.__worktreePrune"></a> |
|
306 <h4>GitWorktreeDialog.__worktreePrune</h4> |
|
307 <b>__worktreePrune</b>(<i></i>) |
|
308 |
|
309 <p> |
|
310 Private slot to prune worktree information. |
|
311 </p> |
|
312 <a NAME="GitWorktreeDialog.__worktreeRemove" ID="GitWorktreeDialog.__worktreeRemove"></a> |
|
313 <h4>GitWorktreeDialog.__worktreeRemove</h4> |
|
314 <b>__worktreeRemove</b>(<i>force=False</i>) |
|
315 |
|
316 <p> |
|
317 Private slot to remove a linked worktree. |
|
318 </p> |
|
319 <dl> |
|
320 |
|
321 <dt><i>force</i> (bool (optional)</dt> |
|
322 <dd> |
|
323 flag indicating a forceful remove (defaults to False) |
|
324 </dd> |
|
325 </dl> |
|
326 <a NAME="GitWorktreeDialog.__worktreeRemoveForced" ID="GitWorktreeDialog.__worktreeRemoveForced"></a> |
|
327 <h4>GitWorktreeDialog.__worktreeRemoveForced</h4> |
|
328 <b>__worktreeRemoveForced</b>(<i></i>) |
|
329 |
|
330 <p> |
|
331 Private slot to remove a linked worktree forcefully. |
|
332 </p> |
|
333 <a NAME="GitWorktreeDialog.__worktreeRepair" ID="GitWorktreeDialog.__worktreeRepair"></a> |
|
334 <h4>GitWorktreeDialog.__worktreeRepair</h4> |
|
335 <b>__worktreeRepair</b>(<i>worktreePaths=None</i>) |
|
336 |
|
337 <p> |
|
338 Private slot to repair worktree administrative files. |
|
339 </p> |
|
340 <dl> |
|
341 |
|
342 <dt><i>worktreePaths</i> (list of str (optional))</dt> |
|
343 <dd> |
|
344 list of worktree paths to be repaired (defaults to None) |
|
345 </dd> |
|
346 </dl> |
|
347 <a NAME="GitWorktreeDialog.__worktreeRepairMultiple" ID="GitWorktreeDialog.__worktreeRepairMultiple"></a> |
|
348 <h4>GitWorktreeDialog.__worktreeRepairMultiple</h4> |
|
349 <b>__worktreeRepairMultiple</b>(<i></i>) |
|
350 |
|
351 <p> |
|
352 Private slot to repair worktree administrative files for multiple worktree |
|
353 paths. |
|
354 </p> |
|
355 <a NAME="GitWorktreeDialog.__worktreeUnlock" ID="GitWorktreeDialog.__worktreeUnlock"></a> |
|
356 <h4>GitWorktreeDialog.__worktreeUnlock</h4> |
|
357 <b>__worktreeUnlock</b>(<i></i>) |
|
358 |
|
359 <p> |
|
360 Private slot to unlock a worktree. |
|
361 </p> |
|
362 <a NAME="GitWorktreeDialog.closeEvent" ID="GitWorktreeDialog.closeEvent"></a> |
|
363 <h4>GitWorktreeDialog.closeEvent</h4> |
|
364 <b>closeEvent</b>(<i>e</i>) |
|
365 |
|
366 <p> |
|
367 Protected slot implementing a close event handler. |
|
368 </p> |
|
369 <dl> |
|
370 |
|
371 <dt><i>e</i></dt> |
|
372 <dd> |
|
373 close event (QCloseEvent) |
|
374 </dd> |
|
375 </dl> |
|
376 <a NAME="GitWorktreeDialog.on_buttonBox_clicked" ID="GitWorktreeDialog.on_buttonBox_clicked"></a> |
|
377 <h4>GitWorktreeDialog.on_buttonBox_clicked</h4> |
|
378 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
379 |
|
380 <p> |
|
381 Private slot called by a button of the button box clicked. |
|
382 </p> |
|
383 <dl> |
|
384 |
|
385 <dt><i>button</i> (QAbstractButton)</dt> |
|
386 <dd> |
|
387 button that was clicked |
|
388 </dd> |
|
389 </dl> |
|
390 <a NAME="GitWorktreeDialog.on_expireCheckBox_toggled" ID="GitWorktreeDialog.on_expireCheckBox_toggled"></a> |
|
391 <h4>GitWorktreeDialog.on_expireCheckBox_toggled</h4> |
|
392 <b>on_expireCheckBox_toggled</b>(<i>checked</i>) |
|
393 |
|
394 <p> |
|
395 Private slot to handle a change of the expire checkbox. |
|
396 </p> |
|
397 <dl> |
|
398 |
|
399 <dt><i>checked</i> (bool)</dt> |
|
400 <dd> |
|
401 state of the checkbox |
|
402 </dd> |
|
403 </dl> |
|
404 <a NAME="GitWorktreeDialog.on_expireDateTimeEdit_dateTimeChanged" ID="GitWorktreeDialog.on_expireDateTimeEdit_dateTimeChanged"></a> |
|
405 <h4>GitWorktreeDialog.on_expireDateTimeEdit_dateTimeChanged</h4> |
|
406 <b>on_expireDateTimeEdit_dateTimeChanged</b>(<i>dateTime</i>) |
|
407 |
|
408 <p> |
|
409 Private slot to handle a change of the expire date and time. |
|
410 </p> |
|
411 <dl> |
|
412 |
|
413 <dt><i>dateTime</i> (QDateTime)</dt> |
|
414 <dd> |
|
415 DESCRIPTION |
|
416 </dd> |
|
417 </dl> |
|
418 <a NAME="GitWorktreeDialog.show" ID="GitWorktreeDialog.show"></a> |
|
419 <h4>GitWorktreeDialog.show</h4> |
|
420 <b>show</b>(<i></i>) |
|
421 |
|
422 <p> |
|
423 Public slot to show the dialog. |
|
424 </p> |
|
425 <a NAME="GitWorktreeDialog.start" ID="GitWorktreeDialog.start"></a> |
|
426 <h4>GitWorktreeDialog.start</h4> |
|
427 <b>start</b>(<i>projectDir</i>) |
|
428 |
|
429 <p> |
|
430 Public slot to start the git worktree list command. |
|
431 </p> |
|
432 <dl> |
|
433 |
|
434 <dt><i>projectDir</i> (str)</dt> |
|
435 <dd> |
|
436 name of the project directory |
|
437 </dd> |
|
438 </dl> |
|
439 <div align="right"><a href="#top">Up</a></div> |
|
440 <hr /> |
|
441 </body></html> |