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