eric6/Documentation/Source/eric6.Plugins.VcsPlugins.vcsGit.GitDiffGenerator.html

changeset 6942
2602857055c5
parent 6123
39cd368143db
child 7273
391d6b7b1eff
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Plugins.VcsPlugins.vcsGit.GitDiffGenerator</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><a NAME="top" ID="top"></a>
22 <h1>eric6.Plugins.VcsPlugins.vcsGit.GitDiffGenerator</h1>
23 <p>
24 Module implementing a class to generate the output of the git diff command
25 process.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#GitDiffGenerator">GitDiffGenerator</a></td>
35 <td>Class implementing the generation of output of the git diff command.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="GitDiffGenerator" ID="GitDiffGenerator"></a>
44 <h2>GitDiffGenerator</h2>
45 <p>
46 Class implementing the generation of output of the git diff command.
47 </p><h3>Signals</h3>
48 <dl>
49 <dt>finished()</dt>
50 <dd>
51 emitted when all processes have finished
52 </dd>
53 </dl>
54 <h3>Derived from</h3>
55 QObject
56 <h3>Class Attributes</h3>
57 <table>
58 <tr><td>None</td></tr>
59 </table>
60 <h3>Class Methods</h3>
61 <table>
62 <tr><td>None</td></tr>
63 </table>
64 <h3>Methods</h3>
65 <table>
66 <tr>
67 <td><a href="#GitDiffGenerator.__init__">GitDiffGenerator</a></td>
68 <td>Constructor</td>
69 </tr><tr>
70 <td><a href="#GitDiffGenerator.__procFinished">__procFinished</a></td>
71 <td>Private slot connected to the finished signal.</td>
72 </tr><tr>
73 <td><a href="#GitDiffGenerator.__processFileLine">__processFileLine</a></td>
74 <td>Private slot to process a line giving the old/new file.</td>
75 </tr><tr>
76 <td><a href="#GitDiffGenerator.__processLine">__processLine</a></td>
77 <td>Private method to process one line of output.</td>
78 </tr><tr>
79 <td><a href="#GitDiffGenerator.__readStderr">__readStderr</a></td>
80 <td>Private slot to handle the readyReadStandardError signal.</td>
81 </tr><tr>
82 <td><a href="#GitDiffGenerator.__readStdout">__readStdout</a></td>
83 <td>Private slot to handle the readyReadStandardOutput signal.</td>
84 </tr><tr>
85 <td><a href="#GitDiffGenerator.getResult">getResult</a></td>
86 <td>Public method to return the result data.</td>
87 </tr><tr>
88 <td><a href="#GitDiffGenerator.start">start</a></td>
89 <td>Public slot to start the git diff command.</td>
90 </tr><tr>
91 <td><a href="#GitDiffGenerator.stopProcesses">stopProcesses</a></td>
92 <td>Public slot to stop the diff processes.</td>
93 </tr>
94 </table>
95 <h3>Static Methods</h3>
96 <table>
97 <tr><td>None</td></tr>
98 </table>
99 <a NAME="GitDiffGenerator.__init__" ID="GitDiffGenerator.__init__"></a>
100 <h4>GitDiffGenerator (Constructor)</h4>
101 <b>GitDiffGenerator</b>(<i>vcs, parent=None</i>)
102 <p>
103 Constructor
104 </p><dl>
105 <dt><i>vcs</i></dt>
106 <dd>
107 reference to the vcs object
108 </dd><dt><i>parent</i></dt>
109 <dd>
110 parent widget (QWidget)
111 </dd>
112 </dl><a NAME="GitDiffGenerator.__procFinished" ID="GitDiffGenerator.__procFinished"></a>
113 <h4>GitDiffGenerator.__procFinished</h4>
114 <b>__procFinished</b>(<i>exitCode, exitStatus</i>)
115 <p>
116 Private slot connected to the finished signal.
117 </p><dl>
118 <dt><i>exitCode</i></dt>
119 <dd>
120 exit code of the process (integer)
121 </dd><dt><i>exitStatus</i></dt>
122 <dd>
123 exit status of the process (QProcess.ExitStatus)
124 </dd>
125 </dl><a NAME="GitDiffGenerator.__processFileLine" ID="GitDiffGenerator.__processFileLine"></a>
126 <h4>GitDiffGenerator.__processFileLine</h4>
127 <b>__processFileLine</b>(<i>line, isTopDiff</i>)
128 <p>
129 Private slot to process a line giving the old/new file.
130 </p><dl>
131 <dt><i>line</i></dt>
132 <dd>
133 line to be processed (string)
134 </dd><dt><i>isTopDiff</i></dt>
135 <dd>
136 flag indicating to show the output in the top
137 output widget (boolean)
138 </dd>
139 </dl><a NAME="GitDiffGenerator.__processLine" ID="GitDiffGenerator.__processLine"></a>
140 <h4>GitDiffGenerator.__processLine</h4>
141 <b>__processLine</b>(<i>line, isTopDiff</i>)
142 <p>
143 Private method to process one line of output.
144 </p><dl>
145 <dt><i>line</i></dt>
146 <dd>
147 output line to process (string)
148 </dd><dt><i>isTopDiff</i></dt>
149 <dd>
150 flag indicating to show the output in the top
151 output widget (boolean)
152 </dd>
153 </dl><a NAME="GitDiffGenerator.__readStderr" ID="GitDiffGenerator.__readStderr"></a>
154 <h4>GitDiffGenerator.__readStderr</h4>
155 <b>__readStderr</b>(<i>process</i>)
156 <p>
157 Private slot to handle the readyReadStandardError signal.
158 </p><p>
159 It reads the error output of the process and inserts it into the
160 error pane.
161 </p><dl>
162 <dt><i>process</i> (QProcess)</dt>
163 <dd>
164 reference to the process providing error output
165 </dd>
166 </dl><a NAME="GitDiffGenerator.__readStdout" ID="GitDiffGenerator.__readStdout"></a>
167 <h4>GitDiffGenerator.__readStdout</h4>
168 <b>__readStdout</b>(<i>process</i>)
169 <p>
170 Private slot to handle the readyReadStandardOutput signal.
171 </p><p>
172 It reads the output of the process, formats it and inserts it into
173 the contents pane.
174 </p><dl>
175 <dt><i>process</i> (QProcess)</dt>
176 <dd>
177 reference to the process providing output
178 </dd>
179 </dl><a NAME="GitDiffGenerator.getResult" ID="GitDiffGenerator.getResult"></a>
180 <h4>GitDiffGenerator.getResult</h4>
181 <b>getResult</b>(<i></i>)
182 <p>
183 Public method to return the result data.
184 </p><dl>
185 <dt>Returns:</dt>
186 <dd>
187 tuple of lists of string containing lines of the diff, the diff
188 between stage and repo for 'work2stage2repo' mode (empty
189 otherwise), the list of errors and a list of tuples of filenames
190 and the line into the diff output.
191 </dd>
192 </dl><a NAME="GitDiffGenerator.start" ID="GitDiffGenerator.start"></a>
193 <h4>GitDiffGenerator.start</h4>
194 <b>start</b>(<i>fn, versions=None, diffMode="work2repo", stashName=""</i>)
195 <p>
196 Public slot to start the git diff command.
197 </p><dl>
198 <dt><i>fn</i></dt>
199 <dd>
200 filename to be diffed (string)
201 </dd><dt><i>versions</i></dt>
202 <dd>
203 list of versions to be diffed (list of up to 2 strings
204 or None)
205 </dd><dt><i>diffMode</i></dt>
206 <dd>
207 indication for the type of diff to be performed (
208 'work2repo' compares the working tree with the HEAD commit,
209 'work2stage' compares the working tree with the staging area,
210 'stage2repo' compares the staging area with the HEAD commit,
211 'work2stage2repo' compares the working tree with the staging area
212 and the staging area with the HEAD commit,
213 'stash' shows the diff for a stash)
214 </dd><dt><i>stashName</i></dt>
215 <dd>
216 name of the stash to show a diff for (string)
217 </dd>
218 </dl><dl>
219 <dt>Returns:</dt>
220 <dd>
221 flag indicating the start status (boolean)
222 </dd>
223 </dl><a NAME="GitDiffGenerator.stopProcesses" ID="GitDiffGenerator.stopProcesses"></a>
224 <h4>GitDiffGenerator.stopProcesses</h4>
225 <b>stopProcesses</b>(<i></i>)
226 <p>
227 Public slot to stop the diff processes.
228 </p>
229 <div align="right"><a href="#top">Up</a></div>
230 <hr />
231 </body></html>

eric ide

mercurial