5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.Plugins.VcsPlugins.vcsGit.GitDiffGenerator</h1> |
9 <h1>eric7.Plugins.VcsPlugins.vcsGit.GitDiffGenerator</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a class to generate the output of the git diff command |
11 Module implementing a class to generate the output of the git diff command |
13 process. |
12 process. |
14 </p> |
13 </p> |
|
14 |
15 <h3>Global Attributes</h3> |
15 <h3>Global Attributes</h3> |
16 |
16 <table> |
17 <table> |
17 <tr><td>None</td></tr> |
18 <tr><td>None</td></tr> |
18 </table> |
19 </table> |
19 |
20 <h3>Classes</h3> |
20 <h3>Classes</h3> |
21 |
21 <table> |
22 <table> |
|
23 |
|
24 <tr> |
22 <tr> |
25 <td><a href="#GitDiffGenerator">GitDiffGenerator</a></td> |
23 <td><a href="#GitDiffGenerator">GitDiffGenerator</a></td> |
26 <td>Class implementing the generation of output of the git diff command.</td> |
24 <td>Class implementing the generation of output of the git diff command.</td> |
27 </tr> |
25 </tr> |
28 </table> |
26 </table> |
|
27 |
29 <h3>Functions</h3> |
28 <h3>Functions</h3> |
30 |
29 <table> |
31 <table> |
30 <tr><td>None</td></tr> |
32 <tr><td>None</td></tr> |
31 </table> |
33 </table> |
32 |
34 <hr /> |
33 <hr /> |
35 <hr /> |
34 <hr /> |
36 <a NAME="GitDiffGenerator" ID="GitDiffGenerator"></a> |
35 <a NAME="GitDiffGenerator" ID="GitDiffGenerator"></a> |
37 <h2>GitDiffGenerator</h2> |
36 <h2>GitDiffGenerator</h2> |
38 |
|
39 <p> |
37 <p> |
40 Class implementing the generation of output of the git diff command. |
38 Class implementing the generation of output of the git diff command. |
41 </p> |
39 </p> |
|
40 |
42 <h3>Signals</h3> |
41 <h3>Signals</h3> |
43 <dl> |
42 <dl> |
44 |
43 |
45 <dt>finished()</dt> |
44 <dt>finished()</dt> |
46 <dd> |
45 <dd> |
48 </dd> |
47 </dd> |
49 </dl> |
48 </dl> |
50 <h3>Derived from</h3> |
49 <h3>Derived from</h3> |
51 QObject |
50 QObject |
52 <h3>Class Attributes</h3> |
51 <h3>Class Attributes</h3> |
53 |
52 <table> |
54 <table> |
53 <tr><td>None</td></tr> |
55 <tr><td>None</td></tr> |
54 </table> |
56 </table> |
55 |
57 <h3>Class Methods</h3> |
56 <h3>Class Methods</h3> |
58 |
57 <table> |
59 <table> |
58 <tr><td>None</td></tr> |
60 <tr><td>None</td></tr> |
59 </table> |
61 </table> |
60 |
62 <h3>Methods</h3> |
61 <h3>Methods</h3> |
63 |
62 <table> |
64 <table> |
|
65 |
|
66 <tr> |
63 <tr> |
67 <td><a href="#GitDiffGenerator.__init__">GitDiffGenerator</a></td> |
64 <td><a href="#GitDiffGenerator.__init__">GitDiffGenerator</a></td> |
68 <td>Constructor</td> |
65 <td>Constructor</td> |
69 </tr> |
66 </tr> |
70 <tr> |
67 <tr> |
98 <tr> |
95 <tr> |
99 <td><a href="#GitDiffGenerator.stopProcesses">stopProcesses</a></td> |
96 <td><a href="#GitDiffGenerator.stopProcesses">stopProcesses</a></td> |
100 <td>Public slot to stop the diff processes.</td> |
97 <td>Public slot to stop the diff processes.</td> |
101 </tr> |
98 </tr> |
102 </table> |
99 </table> |
|
100 |
103 <h3>Static Methods</h3> |
101 <h3>Static Methods</h3> |
104 |
102 <table> |
105 <table> |
103 <tr><td>None</td></tr> |
106 <tr><td>None</td></tr> |
104 </table> |
107 </table> |
105 |
108 |
106 |
109 <a NAME="GitDiffGenerator.__init__" ID="GitDiffGenerator.__init__"></a> |
107 <a NAME="GitDiffGenerator.__init__" ID="GitDiffGenerator.__init__"></a> |
110 <h4>GitDiffGenerator (Constructor)</h4> |
108 <h4>GitDiffGenerator (Constructor)</h4> |
111 <b>GitDiffGenerator</b>(<i>vcs, parent=None</i>) |
109 <b>GitDiffGenerator</b>(<i>vcs, parent=None</i>) |
112 |
|
113 <p> |
110 <p> |
114 Constructor |
111 Constructor |
115 </p> |
112 </p> |
|
113 |
116 <dl> |
114 <dl> |
117 |
115 |
118 <dt><i>vcs</i> (Git)</dt> |
116 <dt><i>vcs</i> (Git)</dt> |
119 <dd> |
117 <dd> |
120 reference to the vcs object |
118 reference to the vcs object |
125 </dd> |
123 </dd> |
126 </dl> |
124 </dl> |
127 <a NAME="GitDiffGenerator.__procFinished" ID="GitDiffGenerator.__procFinished"></a> |
125 <a NAME="GitDiffGenerator.__procFinished" ID="GitDiffGenerator.__procFinished"></a> |
128 <h4>GitDiffGenerator.__procFinished</h4> |
126 <h4>GitDiffGenerator.__procFinished</h4> |
129 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
127 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
130 |
|
131 <p> |
128 <p> |
132 Private slot connected to the finished signal. |
129 Private slot connected to the finished signal. |
133 </p> |
130 </p> |
|
131 |
134 <dl> |
132 <dl> |
135 |
133 |
136 <dt><i>exitCode</i> (int)</dt> |
134 <dt><i>exitCode</i> (int)</dt> |
137 <dd> |
135 <dd> |
138 exit code of the process |
136 exit code of the process |
143 </dd> |
141 </dd> |
144 </dl> |
142 </dl> |
145 <a NAME="GitDiffGenerator.__processFileLine" ID="GitDiffGenerator.__processFileLine"></a> |
143 <a NAME="GitDiffGenerator.__processFileLine" ID="GitDiffGenerator.__processFileLine"></a> |
146 <h4>GitDiffGenerator.__processFileLine</h4> |
144 <h4>GitDiffGenerator.__processFileLine</h4> |
147 <b>__processFileLine</b>(<i>line, isTopDiff</i>) |
145 <b>__processFileLine</b>(<i>line, isTopDiff</i>) |
148 |
|
149 <p> |
146 <p> |
150 Private slot to process a line giving the old/new file. |
147 Private slot to process a line giving the old/new file. |
151 </p> |
148 </p> |
|
149 |
152 <dl> |
150 <dl> |
153 |
151 |
154 <dt><i>line</i> (str)</dt> |
152 <dt><i>line</i> (str)</dt> |
155 <dd> |
153 <dd> |
156 line to be processed |
154 line to be processed |
162 </dd> |
160 </dd> |
163 </dl> |
161 </dl> |
164 <a NAME="GitDiffGenerator.__processLine" ID="GitDiffGenerator.__processLine"></a> |
162 <a NAME="GitDiffGenerator.__processLine" ID="GitDiffGenerator.__processLine"></a> |
165 <h4>GitDiffGenerator.__processLine</h4> |
163 <h4>GitDiffGenerator.__processLine</h4> |
166 <b>__processLine</b>(<i>line, isTopDiff</i>) |
164 <b>__processLine</b>(<i>line, isTopDiff</i>) |
167 |
|
168 <p> |
165 <p> |
169 Private method to process one line of output. |
166 Private method to process one line of output. |
170 </p> |
167 </p> |
|
168 |
171 <dl> |
169 <dl> |
172 |
170 |
173 <dt><i>line</i> (str)</dt> |
171 <dt><i>line</i> (str)</dt> |
174 <dd> |
172 <dd> |
175 output line to process |
173 output line to process |
181 </dd> |
179 </dd> |
182 </dl> |
180 </dl> |
183 <a NAME="GitDiffGenerator.__readStderr" ID="GitDiffGenerator.__readStderr"></a> |
181 <a NAME="GitDiffGenerator.__readStderr" ID="GitDiffGenerator.__readStderr"></a> |
184 <h4>GitDiffGenerator.__readStderr</h4> |
182 <h4>GitDiffGenerator.__readStderr</h4> |
185 <b>__readStderr</b>(<i>process</i>) |
183 <b>__readStderr</b>(<i>process</i>) |
186 |
|
187 <p> |
184 <p> |
188 Private slot to handle the readyReadStandardError signal. |
185 Private slot to handle the readyReadStandardError signal. |
189 </p> |
186 </p> |
190 <p> |
187 <p> |
191 It reads the error output of the process and inserts it into the |
188 It reads the error output of the process and inserts it into the |
192 error pane. |
189 error pane. |
193 </p> |
190 </p> |
|
191 |
194 <dl> |
192 <dl> |
195 |
193 |
196 <dt><i>process</i> (QProcess)</dt> |
194 <dt><i>process</i> (QProcess)</dt> |
197 <dd> |
195 <dd> |
198 reference to the process providing error output |
196 reference to the process providing error output |
199 </dd> |
197 </dd> |
200 </dl> |
198 </dl> |
201 <a NAME="GitDiffGenerator.__readStdout" ID="GitDiffGenerator.__readStdout"></a> |
199 <a NAME="GitDiffGenerator.__readStdout" ID="GitDiffGenerator.__readStdout"></a> |
202 <h4>GitDiffGenerator.__readStdout</h4> |
200 <h4>GitDiffGenerator.__readStdout</h4> |
203 <b>__readStdout</b>(<i>process</i>) |
201 <b>__readStdout</b>(<i>process</i>) |
204 |
|
205 <p> |
202 <p> |
206 Private slot to handle the readyReadStandardOutput signal. |
203 Private slot to handle the readyReadStandardOutput signal. |
207 </p> |
204 </p> |
208 <p> |
205 <p> |
209 It reads the output of the process, formats it and inserts it into |
206 It reads the output of the process, formats it and inserts it into |
210 the contents pane. |
207 the contents pane. |
211 </p> |
208 </p> |
|
209 |
212 <dl> |
210 <dl> |
213 |
211 |
214 <dt><i>process</i> (QProcess)</dt> |
212 <dt><i>process</i> (QProcess)</dt> |
215 <dd> |
213 <dd> |
216 reference to the process providing output |
214 reference to the process providing output |
217 </dd> |
215 </dd> |
218 </dl> |
216 </dl> |
219 <a NAME="GitDiffGenerator.getResult" ID="GitDiffGenerator.getResult"></a> |
217 <a NAME="GitDiffGenerator.getResult" ID="GitDiffGenerator.getResult"></a> |
220 <h4>GitDiffGenerator.getResult</h4> |
218 <h4>GitDiffGenerator.getResult</h4> |
221 <b>getResult</b>(<i></i>) |
219 <b>getResult</b>(<i></i>) |
222 |
|
223 <p> |
220 <p> |
224 Public method to return the result data. |
221 Public method to return the result data. |
225 </p> |
222 </p> |
|
223 |
226 <dl> |
224 <dl> |
227 <dt>Return:</dt> |
225 <dt>Return:</dt> |
228 <dd> |
226 <dd> |
229 tuple of lists of string containing lines of the diff, the diff |
227 tuple of lists of string containing lines of the diff, the diff |
230 between stage and repo for 'work2stage2repo' mode (empty |
228 between stage and repo for 'work2stage2repo' mode (empty |
239 </dd> |
237 </dd> |
240 </dl> |
238 </dl> |
241 <a NAME="GitDiffGenerator.start" ID="GitDiffGenerator.start"></a> |
239 <a NAME="GitDiffGenerator.start" ID="GitDiffGenerator.start"></a> |
242 <h4>GitDiffGenerator.start</h4> |
240 <h4>GitDiffGenerator.start</h4> |
243 <b>start</b>(<i>fn, versions=None, diffMode="work2repo", stashName=""</i>) |
241 <b>start</b>(<i>fn, versions=None, diffMode="work2repo", stashName=""</i>) |
244 |
|
245 <p> |
242 <p> |
246 Public slot to start the git diff command. |
243 Public slot to start the git diff command. |
247 </p> |
244 </p> |
|
245 |
248 <dl> |
246 <dl> |
249 |
247 |
250 <dt><i>fn</i> (str)</dt> |
248 <dt><i>fn</i> (str)</dt> |
251 <dd> |
249 <dd> |
252 filename to be diffed |
250 filename to be diffed |
291 </dd> |
289 </dd> |
292 </dl> |
290 </dl> |
293 <a NAME="GitDiffGenerator.stopProcesses" ID="GitDiffGenerator.stopProcesses"></a> |
291 <a NAME="GitDiffGenerator.stopProcesses" ID="GitDiffGenerator.stopProcesses"></a> |
294 <h4>GitDiffGenerator.stopProcesses</h4> |
292 <h4>GitDiffGenerator.stopProcesses</h4> |
295 <b>stopProcesses</b>(<i></i>) |
293 <b>stopProcesses</b>(<i></i>) |
296 |
|
297 <p> |
294 <p> |
298 Public slot to stop the diff processes. |
295 Public slot to stop the diff processes. |
299 </p> |
296 </p> |
|
297 |
300 <div align="right"><a href="#top">Up</a></div> |
298 <div align="right"><a href="#top">Up</a></div> |
301 <hr /> |
299 <hr /> |
302 </body></html> |
300 </body></html> |