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

changeset 6020
baf6da1ae288
child 6123
39cd368143db
equal deleted inserted replaced
6019:58ecdaf0b789 6020:baf6da1ae288
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></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><a NAME="GitDiffGenerator.__readStdout" ID="GitDiffGenerator.__readStdout"></a>
162 <h4>GitDiffGenerator.__readStdout</h4>
163 <b>__readStdout</b>(<i></i>)
164 <p>
165 Private slot to handle the readyReadStandardOutput signal.
166 </p><p>
167 It reads the output of the process, formats it and inserts it into
168 the contents pane.
169 </p><a NAME="GitDiffGenerator.getResult" ID="GitDiffGenerator.getResult"></a>
170 <h4>GitDiffGenerator.getResult</h4>
171 <b>getResult</b>(<i></i>)
172 <p>
173 Public method to return the result data.
174 </p><dl>
175 <dt>Returns:</dt>
176 <dd>
177 tuple of lists of string containing lines of the diff, the diff
178 between stage and repo for 'work2stage2repo' mode (empty
179 otherwise), the list of errors and a list of tuples of filenames
180 and the line into the diff output.
181 </dd>
182 </dl><a NAME="GitDiffGenerator.start" ID="GitDiffGenerator.start"></a>
183 <h4>GitDiffGenerator.start</h4>
184 <b>start</b>(<i>fn, versions=None, diffMode="work2repo", stashName=""</i>)
185 <p>
186 Public slot to start the git diff command.
187 </p><dl>
188 <dt><i>fn</i></dt>
189 <dd>
190 filename to be diffed (string)
191 </dd><dt><i>versions</i></dt>
192 <dd>
193 list of versions to be diffed (list of up to 2 strings
194 or None)
195 </dd><dt><i>diffMode</i></dt>
196 <dd>
197 indication for the type of diff to be performed (
198 'work2repo' compares the working tree with the HEAD commit,
199 'work2stage' compares the working tree with the staging area,
200 'stage2repo' compares the staging area with the HEAD commit,
201 'work2stage2repo' compares the working tree with the staging area
202 and the staging area with the HEAD commit,
203 'stash' shows the diff for a stash)
204 </dd><dt><i>stashName</i></dt>
205 <dd>
206 name of the stash to show a diff for (string)
207 </dd>
208 </dl><dl>
209 <dt>Returns:</dt>
210 <dd>
211 flag indicating the start status (boolean)
212 </dd>
213 </dl><a NAME="GitDiffGenerator.stopProcesses" ID="GitDiffGenerator.stopProcesses"></a>
214 <h4>GitDiffGenerator.stopProcesses</h4>
215 <b>stopProcesses</b>(<i></i>)
216 <p>
217 Public slot to stop the diff processes.
218 </p>
219 <div align="right"><a href="#top">Up</a></div>
220 <hr />
221 </body></html>

eric ide

mercurial