|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.VCS.ProjectHelper</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.VCS.ProjectHelper</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the base class of the VCS project helper. |
|
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="#VcsProjectHelper">VcsProjectHelper</a></td> |
|
25 <td>Class implementing the base class of the VCS project helper.</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="VcsProjectHelper" ID="VcsProjectHelper"></a> |
|
36 <h2>VcsProjectHelper</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the base class of the VCS project helper. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 QObject |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</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="#VcsProjectHelper.__init__">VcsProjectHelper</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#VcsProjectHelper._vcsCheckout">_vcsCheckout</a></td> |
|
63 <td>Protected slot used to create a local project from the repository.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#VcsProjectHelper._vcsCleanup">_vcsCleanup</a></td> |
|
67 <td>Protected slot used to cleanup the local project.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#VcsProjectHelper._vcsCommand">_vcsCommand</a></td> |
|
71 <td>Protected slot used to execute an arbitrary vcs command.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#VcsProjectHelper._vcsCommandOptions">_vcsCommandOptions</a></td> |
|
75 <td>Protected slot to edit the VCS command options.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#VcsProjectHelper._vcsCommit">_vcsCommit</a></td> |
|
79 <td>Protected slot used to commit changes to the local project to the repository.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#VcsProjectHelper._vcsDiff">_vcsDiff</a></td> |
|
83 <td>Protected slot used to show the difference of the local project to the repository.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#VcsProjectHelper._vcsExport">_vcsExport</a></td> |
|
87 <td>Protected slot used to export a project from the repository.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#VcsProjectHelper._vcsImport">_vcsImport</a></td> |
|
91 <td>Protected slot used to import the local project into the repository.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#VcsProjectHelper._vcsInfoDisplay">_vcsInfoDisplay</a></td> |
|
95 <td>Protected slot called to show some vcs information.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#VcsProjectHelper._vcsLogBrowser">_vcsLogBrowser</a></td> |
|
99 <td>Protected slot used to show the log of the local project with a log browser dialog.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#VcsProjectHelper._vcsMerge">_vcsMerge</a></td> |
|
103 <td>Protected slot used to merge changes of a tag/revision into the local project.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#VcsProjectHelper._vcsRemove">_vcsRemove</a></td> |
|
107 <td>Protected slot used to remove the local project from the repository.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#VcsProjectHelper._vcsRevert">_vcsRevert</a></td> |
|
111 <td>Protected slot used to revert changes made to the local project.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#VcsProjectHelper._vcsStatus">_vcsStatus</a></td> |
|
115 <td>Protected slot used to show the status of the local project.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#VcsProjectHelper._vcsSwitch">_vcsSwitch</a></td> |
|
119 <td>Protected slot used to switch the local project to another tag/branch.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#VcsProjectHelper._vcsTag">_vcsTag</a></td> |
|
123 <td>Protected slot used to tag the local project in the repository.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#VcsProjectHelper._vcsUpdate">_vcsUpdate</a></td> |
|
127 <td>Protected slot used to update the local project from the repository.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#VcsProjectHelper.initActions">initActions</a></td> |
|
131 <td>Public method to generate the action objects.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#VcsProjectHelper.initBasicToolbar">initBasicToolbar</a></td> |
|
135 <td>Public slot to initialize the basic VCS toolbar.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#VcsProjectHelper.initMenu">initMenu</a></td> |
|
139 <td>Public method to generate the VCS menu.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#VcsProjectHelper.initToolbar">initToolbar</a></td> |
|
143 <td>Public slot to initialize the VCS toolbar.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#VcsProjectHelper.revertChanges">revertChanges</a></td> |
|
147 <td>Local function to revert the changes made to the project object.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#VcsProjectHelper.setObjects">setObjects</a></td> |
|
151 <td>Public method to set references to the vcs and project objects.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#VcsProjectHelper.showMenu">showMenu</a></td> |
|
155 <td>Public slot called before the vcs menu is shown.</td> |
|
156 </tr> |
|
157 </table> |
|
158 <h3>Static Methods</h3> |
|
159 |
|
160 <table> |
|
161 <tr><td>None</td></tr> |
|
162 </table> |
|
163 |
|
164 <a NAME="VcsProjectHelper.__init__" ID="VcsProjectHelper.__init__"></a> |
|
165 <h4>VcsProjectHelper (Constructor)</h4> |
|
166 <b>VcsProjectHelper</b>(<i>vcsObject, projectObject, parent=None, name=None</i>) |
|
167 |
|
168 <p> |
|
169 Constructor |
|
170 </p> |
|
171 <dl> |
|
172 |
|
173 <dt><i>vcsObject</i></dt> |
|
174 <dd> |
|
175 reference to the vcs object |
|
176 </dd> |
|
177 <dt><i>projectObject</i></dt> |
|
178 <dd> |
|
179 reference to the project object |
|
180 </dd> |
|
181 <dt><i>parent</i></dt> |
|
182 <dd> |
|
183 parent widget (QWidget) |
|
184 </dd> |
|
185 <dt><i>name</i></dt> |
|
186 <dd> |
|
187 name of this object (string) |
|
188 </dd> |
|
189 </dl> |
|
190 <a NAME="VcsProjectHelper._vcsCheckout" ID="VcsProjectHelper._vcsCheckout"></a> |
|
191 <h4>VcsProjectHelper._vcsCheckout</h4> |
|
192 <b>_vcsCheckout</b>(<i>export=False</i>) |
|
193 |
|
194 <p> |
|
195 Protected slot used to create a local project from the repository. |
|
196 </p> |
|
197 <dl> |
|
198 |
|
199 <dt><i>export</i></dt> |
|
200 <dd> |
|
201 flag indicating whether an export or a checkout |
|
202 should be performed |
|
203 </dd> |
|
204 </dl> |
|
205 <a NAME="VcsProjectHelper._vcsCleanup" ID="VcsProjectHelper._vcsCleanup"></a> |
|
206 <h4>VcsProjectHelper._vcsCleanup</h4> |
|
207 <b>_vcsCleanup</b>(<i></i>) |
|
208 |
|
209 <p> |
|
210 Protected slot used to cleanup the local project. |
|
211 </p> |
|
212 <a NAME="VcsProjectHelper._vcsCommand" ID="VcsProjectHelper._vcsCommand"></a> |
|
213 <h4>VcsProjectHelper._vcsCommand</h4> |
|
214 <b>_vcsCommand</b>(<i></i>) |
|
215 |
|
216 <p> |
|
217 Protected slot used to execute an arbitrary vcs command. |
|
218 </p> |
|
219 <a NAME="VcsProjectHelper._vcsCommandOptions" ID="VcsProjectHelper._vcsCommandOptions"></a> |
|
220 <h4>VcsProjectHelper._vcsCommandOptions</h4> |
|
221 <b>_vcsCommandOptions</b>(<i></i>) |
|
222 |
|
223 <p> |
|
224 Protected slot to edit the VCS command options. |
|
225 </p> |
|
226 <a NAME="VcsProjectHelper._vcsCommit" ID="VcsProjectHelper._vcsCommit"></a> |
|
227 <h4>VcsProjectHelper._vcsCommit</h4> |
|
228 <b>_vcsCommit</b>(<i></i>) |
|
229 |
|
230 <p> |
|
231 Protected slot used to commit changes to the local project to the |
|
232 repository. |
|
233 </p> |
|
234 <a NAME="VcsProjectHelper._vcsDiff" ID="VcsProjectHelper._vcsDiff"></a> |
|
235 <h4>VcsProjectHelper._vcsDiff</h4> |
|
236 <b>_vcsDiff</b>(<i></i>) |
|
237 |
|
238 <p> |
|
239 Protected slot used to show the difference of the local project to |
|
240 the repository. |
|
241 </p> |
|
242 <a NAME="VcsProjectHelper._vcsExport" ID="VcsProjectHelper._vcsExport"></a> |
|
243 <h4>VcsProjectHelper._vcsExport</h4> |
|
244 <b>_vcsExport</b>(<i></i>) |
|
245 |
|
246 <p> |
|
247 Protected slot used to export a project from the repository. |
|
248 </p> |
|
249 <a NAME="VcsProjectHelper._vcsImport" ID="VcsProjectHelper._vcsImport"></a> |
|
250 <h4>VcsProjectHelper._vcsImport</h4> |
|
251 <b>_vcsImport</b>(<i></i>) |
|
252 |
|
253 <p> |
|
254 Protected slot used to import the local project into the repository. |
|
255 </p> |
|
256 <p> |
|
257 <b>NOTE</b>: |
|
258 This does not necessarily make the local project a vcs controlled |
|
259 project. You may have to checkout the project from the repository |
|
260 in order to accomplish that. |
|
261 </p> |
|
262 <a NAME="VcsProjectHelper._vcsInfoDisplay" ID="VcsProjectHelper._vcsInfoDisplay"></a> |
|
263 <h4>VcsProjectHelper._vcsInfoDisplay</h4> |
|
264 <b>_vcsInfoDisplay</b>(<i></i>) |
|
265 |
|
266 <p> |
|
267 Protected slot called to show some vcs information. |
|
268 </p> |
|
269 <a NAME="VcsProjectHelper._vcsLogBrowser" ID="VcsProjectHelper._vcsLogBrowser"></a> |
|
270 <h4>VcsProjectHelper._vcsLogBrowser</h4> |
|
271 <b>_vcsLogBrowser</b>(<i></i>) |
|
272 |
|
273 <p> |
|
274 Protected slot used to show the log of the local project with a |
|
275 log browser dialog. |
|
276 </p> |
|
277 <a NAME="VcsProjectHelper._vcsMerge" ID="VcsProjectHelper._vcsMerge"></a> |
|
278 <h4>VcsProjectHelper._vcsMerge</h4> |
|
279 <b>_vcsMerge</b>(<i></i>) |
|
280 |
|
281 <p> |
|
282 Protected slot used to merge changes of a tag/revision into the local |
|
283 project. |
|
284 </p> |
|
285 <a NAME="VcsProjectHelper._vcsRemove" ID="VcsProjectHelper._vcsRemove"></a> |
|
286 <h4>VcsProjectHelper._vcsRemove</h4> |
|
287 <b>_vcsRemove</b>(<i></i>) |
|
288 |
|
289 <p> |
|
290 Protected slot used to remove the local project from the repository. |
|
291 </p> |
|
292 <p> |
|
293 Depending on the parameters set in the vcs object the project |
|
294 may be removed from the local disk as well. |
|
295 </p> |
|
296 <a NAME="VcsProjectHelper._vcsRevert" ID="VcsProjectHelper._vcsRevert"></a> |
|
297 <h4>VcsProjectHelper._vcsRevert</h4> |
|
298 <b>_vcsRevert</b>(<i></i>) |
|
299 |
|
300 <p> |
|
301 Protected slot used to revert changes made to the local project. |
|
302 </p> |
|
303 <a NAME="VcsProjectHelper._vcsStatus" ID="VcsProjectHelper._vcsStatus"></a> |
|
304 <h4>VcsProjectHelper._vcsStatus</h4> |
|
305 <b>_vcsStatus</b>(<i></i>) |
|
306 |
|
307 <p> |
|
308 Protected slot used to show the status of the local project. |
|
309 </p> |
|
310 <a NAME="VcsProjectHelper._vcsSwitch" ID="VcsProjectHelper._vcsSwitch"></a> |
|
311 <h4>VcsProjectHelper._vcsSwitch</h4> |
|
312 <b>_vcsSwitch</b>(<i></i>) |
|
313 |
|
314 <p> |
|
315 Protected slot used to switch the local project to another tag/branch. |
|
316 </p> |
|
317 <a NAME="VcsProjectHelper._vcsTag" ID="VcsProjectHelper._vcsTag"></a> |
|
318 <h4>VcsProjectHelper._vcsTag</h4> |
|
319 <b>_vcsTag</b>(<i></i>) |
|
320 |
|
321 <p> |
|
322 Protected slot used to tag the local project in the repository. |
|
323 </p> |
|
324 <a NAME="VcsProjectHelper._vcsUpdate" ID="VcsProjectHelper._vcsUpdate"></a> |
|
325 <h4>VcsProjectHelper._vcsUpdate</h4> |
|
326 <b>_vcsUpdate</b>(<i></i>) |
|
327 |
|
328 <p> |
|
329 Protected slot used to update the local project from the repository. |
|
330 </p> |
|
331 <a NAME="VcsProjectHelper.initActions" ID="VcsProjectHelper.initActions"></a> |
|
332 <h4>VcsProjectHelper.initActions</h4> |
|
333 <b>initActions</b>(<i></i>) |
|
334 |
|
335 <p> |
|
336 Public method to generate the action objects. |
|
337 </p> |
|
338 <a NAME="VcsProjectHelper.initBasicToolbar" ID="VcsProjectHelper.initBasicToolbar"></a> |
|
339 <h4>VcsProjectHelper.initBasicToolbar</h4> |
|
340 <b>initBasicToolbar</b>(<i>ui, toolbarManager</i>) |
|
341 |
|
342 <p> |
|
343 Public slot to initialize the basic VCS toolbar. |
|
344 </p> |
|
345 <dl> |
|
346 |
|
347 <dt><i>ui</i></dt> |
|
348 <dd> |
|
349 reference to the main window (UserInterface) |
|
350 </dd> |
|
351 <dt><i>toolbarManager</i></dt> |
|
352 <dd> |
|
353 reference to a toolbar manager object |
|
354 (EricToolBarManager) |
|
355 </dd> |
|
356 </dl> |
|
357 <dl> |
|
358 <dt>Return:</dt> |
|
359 <dd> |
|
360 the toolbar generated (QToolBar) |
|
361 </dd> |
|
362 </dl> |
|
363 <a NAME="VcsProjectHelper.initMenu" ID="VcsProjectHelper.initMenu"></a> |
|
364 <h4>VcsProjectHelper.initMenu</h4> |
|
365 <b>initMenu</b>(<i>menu</i>) |
|
366 |
|
367 <p> |
|
368 Public method to generate the VCS menu. |
|
369 </p> |
|
370 <dl> |
|
371 |
|
372 <dt><i>menu</i></dt> |
|
373 <dd> |
|
374 reference to the menu to be populated (QMenu) |
|
375 </dd> |
|
376 </dl> |
|
377 <a NAME="VcsProjectHelper.initToolbar" ID="VcsProjectHelper.initToolbar"></a> |
|
378 <h4>VcsProjectHelper.initToolbar</h4> |
|
379 <b>initToolbar</b>(<i>ui, toolbarManager</i>) |
|
380 |
|
381 <p> |
|
382 Public slot to initialize the VCS toolbar. |
|
383 </p> |
|
384 <dl> |
|
385 |
|
386 <dt><i>ui</i></dt> |
|
387 <dd> |
|
388 reference to the main window (UserInterface) |
|
389 </dd> |
|
390 <dt><i>toolbarManager</i></dt> |
|
391 <dd> |
|
392 reference to a toolbar manager object |
|
393 (EricToolBarManager) |
|
394 </dd> |
|
395 </dl> |
|
396 <dl> |
|
397 <dt>Return:</dt> |
|
398 <dd> |
|
399 the toolbar generated (QToolBar) |
|
400 </dd> |
|
401 </dl> |
|
402 <a NAME="VcsProjectHelper.revertChanges" ID="VcsProjectHelper.revertChanges"></a> |
|
403 <h4>VcsProjectHelper.revertChanges</h4> |
|
404 <b>revertChanges</b>(<i></i>) |
|
405 |
|
406 <p> |
|
407 Local function to revert the changes made to the project object. |
|
408 </p> |
|
409 <a NAME="VcsProjectHelper.setObjects" ID="VcsProjectHelper.setObjects"></a> |
|
410 <h4>VcsProjectHelper.setObjects</h4> |
|
411 <b>setObjects</b>(<i>vcsObject, projectObject</i>) |
|
412 |
|
413 <p> |
|
414 Public method to set references to the vcs and project objects. |
|
415 </p> |
|
416 <dl> |
|
417 |
|
418 <dt><i>vcsObject</i></dt> |
|
419 <dd> |
|
420 reference to the vcs object |
|
421 </dd> |
|
422 <dt><i>projectObject</i></dt> |
|
423 <dd> |
|
424 reference to the project object |
|
425 </dd> |
|
426 </dl> |
|
427 <a NAME="VcsProjectHelper.showMenu" ID="VcsProjectHelper.showMenu"></a> |
|
428 <h4>VcsProjectHelper.showMenu</h4> |
|
429 <b>showMenu</b>(<i></i>) |
|
430 |
|
431 <p> |
|
432 Public slot called before the vcs menu is shown. |
|
433 </p> |
|
434 <div align="right"><a href="#top">Up</a></div> |
|
435 <hr /> |
|
436 </body></html> |