eric6/Documentation/Source/eric6.Plugins.VcsPlugins.vcsMercurial.HgDiffGenerator.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7370
5fb53279f2df
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.Plugins.VcsPlugins.vcsMercurial.HgDiffGenerator</h1> 23 <h1>eric6.Plugins.VcsPlugins.vcsMercurial.HgDiffGenerator</h1>
24
23 <p> 25 <p>
24 Module implementing a class to generate the output of the hg diff command. 26 Module implementing a class to generate the output of the hg diff command.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#HgDiffGenerator">HgDiffGenerator</a></td> 38 <td><a href="#HgDiffGenerator">HgDiffGenerator</a></td>
34 <td>Class implementing the generation of output of the hg diff command.</td> 39 <td>Class implementing the generation of output of the hg diff command.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
38 <table> 43
39 <tr><td>None</td></tr> 44 <table>
40 </table> 45 <tr><td>None</td></tr>
41 <hr /><hr /> 46 </table>
47 <hr />
48 <hr />
42 <a NAME="HgDiffGenerator" ID="HgDiffGenerator"></a> 49 <a NAME="HgDiffGenerator" ID="HgDiffGenerator"></a>
43 <h2>HgDiffGenerator</h2> 50 <h2>HgDiffGenerator</h2>
51
44 <p> 52 <p>
45 Class implementing the generation of output of the hg diff command. 53 Class implementing the generation of output of the hg diff command.
46 </p><h3>Signals</h3> 54 </p>
47 <dl> 55 <h3>Signals</h3>
56 <dl>
57
48 <dt>finished()</dt> 58 <dt>finished()</dt>
49 <dd> 59 <dd>
50 emitted when all processes have finished 60 emitted when all processes have finished
51 </dd> 61 </dd>
52 </dl> 62 </dl>
53 <h3>Derived from</h3> 63 <h3>Derived from</h3>
54 QObject 64 QObject
55 <h3>Class Attributes</h3> 65 <h3>Class Attributes</h3>
66
56 <table> 67 <table>
57 <tr><td>None</td></tr> 68 <tr><td>None</td></tr>
58 </table> 69 </table>
59 <h3>Class Methods</h3> 70 <h3>Class Methods</h3>
71
60 <table> 72 <table>
61 <tr><td>None</td></tr> 73 <tr><td>None</td></tr>
62 </table> 74 </table>
63 <h3>Methods</h3> 75 <h3>Methods</h3>
64 <table> 76
77 <table>
78
65 <tr> 79 <tr>
66 <td><a href="#HgDiffGenerator.__init__">HgDiffGenerator</a></td> 80 <td><a href="#HgDiffGenerator.__init__">HgDiffGenerator</a></td>
67 <td>Constructor</td> 81 <td>Constructor</td>
68 </tr><tr> 82 </tr>
83 <tr>
69 <td><a href="#HgDiffGenerator.__extractFileName">__extractFileName</a></td> 84 <td><a href="#HgDiffGenerator.__extractFileName">__extractFileName</a></td>
70 <td>Private method to extract the file name out of a file separator line.</td> 85 <td>Private method to extract the file name out of a file separator line.</td>
71 </tr><tr> 86 </tr>
87 <tr>
72 <td><a href="#HgDiffGenerator.__finish">__finish</a></td> 88 <td><a href="#HgDiffGenerator.__finish">__finish</a></td>
73 <td>Private slot called when the process finished or the user pressed the button.</td> 89 <td>Private slot called when the process finished or the user pressed the button.</td>
74 </tr><tr> 90 </tr>
91 <tr>
75 <td><a href="#HgDiffGenerator.__getVersionArg">__getVersionArg</a></td> 92 <td><a href="#HgDiffGenerator.__getVersionArg">__getVersionArg</a></td>
76 <td>Private method to get a hg revision argument for the given revision.</td> 93 <td>Private method to get a hg revision argument for the given revision.</td>
77 </tr><tr> 94 </tr>
95 <tr>
78 <td><a href="#HgDiffGenerator.__processFileLine">__processFileLine</a></td> 96 <td><a href="#HgDiffGenerator.__processFileLine">__processFileLine</a></td>
79 <td>Private slot to process a line giving the old/new file.</td> 97 <td>Private slot to process a line giving the old/new file.</td>
80 </tr><tr> 98 </tr>
99 <tr>
81 <td><a href="#HgDiffGenerator.__processOutputLine">__processOutputLine</a></td> 100 <td><a href="#HgDiffGenerator.__processOutputLine">__processOutputLine</a></td>
82 <td>Private method to process the lines of output.</td> 101 <td>Private method to process the lines of output.</td>
83 </tr><tr> 102 </tr>
103 <tr>
84 <td><a href="#HgDiffGenerator.__readStderr">__readStderr</a></td> 104 <td><a href="#HgDiffGenerator.__readStderr">__readStderr</a></td>
85 <td>Private slot to handle the readyReadStandardError signal.</td> 105 <td>Private slot to handle the readyReadStandardError signal.</td>
86 </tr><tr> 106 </tr>
107 <tr>
87 <td><a href="#HgDiffGenerator.__readStdout">__readStdout</a></td> 108 <td><a href="#HgDiffGenerator.__readStdout">__readStdout</a></td>
88 <td>Private slot to handle the readyReadStandardOutput signal.</td> 109 <td>Private slot to handle the readyReadStandardOutput signal.</td>
89 </tr><tr> 110 </tr>
111 <tr>
90 <td><a href="#HgDiffGenerator.getResult">getResult</a></td> 112 <td><a href="#HgDiffGenerator.getResult">getResult</a></td>
91 <td>Public method to return the result data.</td> 113 <td>Public method to return the result data.</td>
92 </tr><tr> 114 </tr>
115 <tr>
93 <td><a href="#HgDiffGenerator.start">start</a></td> 116 <td><a href="#HgDiffGenerator.start">start</a></td>
94 <td>Public slot to start the hg diff command.</td> 117 <td>Public slot to start the hg diff command.</td>
95 </tr><tr> 118 </tr>
119 <tr>
96 <td><a href="#HgDiffGenerator.stopProcess">stopProcess</a></td> 120 <td><a href="#HgDiffGenerator.stopProcess">stopProcess</a></td>
97 <td>Public slot to stop the diff process.</td> 121 <td>Public slot to stop the diff process.</td>
98 </tr> 122 </tr>
99 </table> 123 </table>
100 <h3>Static Methods</h3> 124 <h3>Static Methods</h3>
101 <table> 125
102 <tr><td>None</td></tr> 126 <table>
103 </table> 127 <tr><td>None</td></tr>
128 </table>
129
104 <a NAME="HgDiffGenerator.__init__" ID="HgDiffGenerator.__init__"></a> 130 <a NAME="HgDiffGenerator.__init__" ID="HgDiffGenerator.__init__"></a>
105 <h4>HgDiffGenerator (Constructor)</h4> 131 <h4>HgDiffGenerator (Constructor)</h4>
106 <b>HgDiffGenerator</b>(<i>vcs, parent=None</i>) 132 <b>HgDiffGenerator</b>(<i>vcs, parent=None</i>)
133
107 <p> 134 <p>
108 Constructor 135 Constructor
109 </p><dl> 136 </p>
137 <dl>
138
110 <dt><i>vcs</i></dt> 139 <dt><i>vcs</i></dt>
111 <dd> 140 <dd>
112 reference to the vcs object 141 reference to the vcs object
113 </dd><dt><i>parent</i></dt> 142 </dd>
143 <dt><i>parent</i></dt>
114 <dd> 144 <dd>
115 parent widget (QWidget) 145 parent widget (QWidget)
116 </dd> 146 </dd>
117 </dl><a NAME="HgDiffGenerator.__extractFileName" ID="HgDiffGenerator.__extractFileName"></a> 147 </dl>
148 <a NAME="HgDiffGenerator.__extractFileName" ID="HgDiffGenerator.__extractFileName"></a>
118 <h4>HgDiffGenerator.__extractFileName</h4> 149 <h4>HgDiffGenerator.__extractFileName</h4>
119 <b>__extractFileName</b>(<i>line</i>) 150 <b>__extractFileName</b>(<i>line</i>)
151
120 <p> 152 <p>
121 Private method to extract the file name out of a file separator line. 153 Private method to extract the file name out of a file separator line.
122 </p><dl> 154 </p>
155 <dl>
156
123 <dt><i>line</i></dt> 157 <dt><i>line</i></dt>
124 <dd> 158 <dd>
125 line to be processed (string) 159 line to be processed (string)
126 </dd> 160 </dd>
127 </dl><dl> 161 </dl>
162 <dl>
128 <dt>Returns:</dt> 163 <dt>Returns:</dt>
129 <dd> 164 <dd>
130 extracted file name (string) 165 extracted file name (string)
131 </dd> 166 </dd>
132 </dl><a NAME="HgDiffGenerator.__finish" ID="HgDiffGenerator.__finish"></a> 167 </dl>
168 <a NAME="HgDiffGenerator.__finish" ID="HgDiffGenerator.__finish"></a>
133 <h4>HgDiffGenerator.__finish</h4> 169 <h4>HgDiffGenerator.__finish</h4>
134 <b>__finish</b>(<i></i>) 170 <b>__finish</b>(<i></i>)
171
135 <p> 172 <p>
136 Private slot called when the process finished or the user pressed 173 Private slot called when the process finished or the user pressed
137 the button. 174 the button.
138 </p><a NAME="HgDiffGenerator.__getVersionArg" ID="HgDiffGenerator.__getVersionArg"></a> 175 </p>
176 <a NAME="HgDiffGenerator.__getVersionArg" ID="HgDiffGenerator.__getVersionArg"></a>
139 <h4>HgDiffGenerator.__getVersionArg</h4> 177 <h4>HgDiffGenerator.__getVersionArg</h4>
140 <b>__getVersionArg</b>(<i>version</i>) 178 <b>__getVersionArg</b>(<i>version</i>)
179
141 <p> 180 <p>
142 Private method to get a hg revision argument for the given revision. 181 Private method to get a hg revision argument for the given revision.
143 </p><dl> 182 </p>
183 <dl>
184
144 <dt><i>version</i></dt> 185 <dt><i>version</i></dt>
145 <dd> 186 <dd>
146 revision (integer or string) 187 revision (integer or string)
147 </dd> 188 </dd>
148 </dl><dl> 189 </dl>
190 <dl>
149 <dt>Returns:</dt> 191 <dt>Returns:</dt>
150 <dd> 192 <dd>
151 version argument (string) 193 version argument (string)
152 </dd> 194 </dd>
153 </dl><a NAME="HgDiffGenerator.__processFileLine" ID="HgDiffGenerator.__processFileLine"></a> 195 </dl>
196 <a NAME="HgDiffGenerator.__processFileLine" ID="HgDiffGenerator.__processFileLine"></a>
154 <h4>HgDiffGenerator.__processFileLine</h4> 197 <h4>HgDiffGenerator.__processFileLine</h4>
155 <b>__processFileLine</b>(<i>line</i>) 198 <b>__processFileLine</b>(<i>line</i>)
199
156 <p> 200 <p>
157 Private slot to process a line giving the old/new file. 201 Private slot to process a line giving the old/new file.
158 </p><dl> 202 </p>
203 <dl>
204
159 <dt><i>line</i></dt> 205 <dt><i>line</i></dt>
160 <dd> 206 <dd>
161 line to be processed (string) 207 line to be processed (string)
162 </dd> 208 </dd>
163 </dl><a NAME="HgDiffGenerator.__processOutputLine" ID="HgDiffGenerator.__processOutputLine"></a> 209 </dl>
210 <a NAME="HgDiffGenerator.__processOutputLine" ID="HgDiffGenerator.__processOutputLine"></a>
164 <h4>HgDiffGenerator.__processOutputLine</h4> 211 <h4>HgDiffGenerator.__processOutputLine</h4>
165 <b>__processOutputLine</b>(<i>line</i>) 212 <b>__processOutputLine</b>(<i>line</i>)
213
166 <p> 214 <p>
167 Private method to process the lines of output. 215 Private method to process the lines of output.
168 </p><dl> 216 </p>
217 <dl>
218
169 <dt><i>line</i></dt> 219 <dt><i>line</i></dt>
170 <dd> 220 <dd>
171 output line to be processed (string) 221 output line to be processed (string)
172 </dd> 222 </dd>
173 </dl><a NAME="HgDiffGenerator.__readStderr" ID="HgDiffGenerator.__readStderr"></a> 223 </dl>
224 <a NAME="HgDiffGenerator.__readStderr" ID="HgDiffGenerator.__readStderr"></a>
174 <h4>HgDiffGenerator.__readStderr</h4> 225 <h4>HgDiffGenerator.__readStderr</h4>
175 <b>__readStderr</b>(<i></i>) 226 <b>__readStderr</b>(<i></i>)
227
176 <p> 228 <p>
177 Private slot to handle the readyReadStandardError signal. 229 Private slot to handle the readyReadStandardError signal.
178 </p><p> 230 </p>
231 <p>
179 It reads the error output of the process and inserts it into the 232 It reads the error output of the process and inserts it into the
180 error pane. 233 error pane.
181 </p><a NAME="HgDiffGenerator.__readStdout" ID="HgDiffGenerator.__readStdout"></a> 234 </p>
235 <a NAME="HgDiffGenerator.__readStdout" ID="HgDiffGenerator.__readStdout"></a>
182 <h4>HgDiffGenerator.__readStdout</h4> 236 <h4>HgDiffGenerator.__readStdout</h4>
183 <b>__readStdout</b>(<i></i>) 237 <b>__readStdout</b>(<i></i>)
238
184 <p> 239 <p>
185 Private slot to handle the readyReadStandardOutput signal. 240 Private slot to handle the readyReadStandardOutput signal.
186 </p><p> 241 </p>
242 <p>
187 It reads the output of the process, formats it and inserts it into 243 It reads the output of the process, formats it and inserts it into
188 the contents pane. 244 the contents pane.
189 </p><a NAME="HgDiffGenerator.getResult" ID="HgDiffGenerator.getResult"></a> 245 </p>
246 <a NAME="HgDiffGenerator.getResult" ID="HgDiffGenerator.getResult"></a>
190 <h4>HgDiffGenerator.getResult</h4> 247 <h4>HgDiffGenerator.getResult</h4>
191 <b>getResult</b>(<i></i>) 248 <b>getResult</b>(<i></i>)
249
192 <p> 250 <p>
193 Public method to return the result data. 251 Public method to return the result data.
194 </p><dl> 252 </p>
253 <dl>
195 <dt>Returns:</dt> 254 <dt>Returns:</dt>
196 <dd> 255 <dd>
197 tuple of lists of string containing lines of the diff, the 256 tuple of lists of string containing lines of the diff, the
198 list of errors and a list of tuples of filenames and the line 257 list of errors and a list of tuples of filenames and the line
199 into the diff output. 258 into the diff output.
200 </dd> 259 </dd>
201 </dl><a NAME="HgDiffGenerator.start" ID="HgDiffGenerator.start"></a> 260 </dl>
261 <a NAME="HgDiffGenerator.start" ID="HgDiffGenerator.start"></a>
202 <h4>HgDiffGenerator.start</h4> 262 <h4>HgDiffGenerator.start</h4>
203 <b>start</b>(<i>fn, versions=None, bundle=None, qdiff=False</i>) 263 <b>start</b>(<i>fn, versions=None, bundle=None, qdiff=False</i>)
264
204 <p> 265 <p>
205 Public slot to start the hg diff command. 266 Public slot to start the hg diff command.
206 </p><dl> 267 </p>
268 <dl>
269
207 <dt><i>fn</i></dt> 270 <dt><i>fn</i></dt>
208 <dd> 271 <dd>
209 filename to be diffed (string) 272 filename to be diffed (string)
210 </dd><dt><i>versions=</i></dt> 273 </dd>
274 <dt><i>versions=</i></dt>
211 <dd> 275 <dd>
212 list of versions to be diffed (list of up to 276 list of versions to be diffed (list of up to
213 2 strings or None) 277 2 strings or None)
214 </dd><dt><i>bundle=</i></dt> 278 </dd>
279 <dt><i>bundle=</i></dt>
215 <dd> 280 <dd>
216 name of a bundle file (string) 281 name of a bundle file (string)
217 </dd><dt><i>qdiff=</i></dt> 282 </dd>
283 <dt><i>qdiff=</i></dt>
218 <dd> 284 <dd>
219 flag indicating qdiff command shall be used (boolean) 285 flag indicating qdiff command shall be used (boolean)
220 </dd> 286 </dd>
221 </dl><dl> 287 </dl>
288 <dl>
222 <dt>Returns:</dt> 289 <dt>Returns:</dt>
223 <dd> 290 <dd>
224 flag indicating a successful start of the diff command 291 flag indicating a successful start of the diff command
225 (boolean) 292 (boolean)
226 </dd> 293 </dd>
227 </dl><a NAME="HgDiffGenerator.stopProcess" ID="HgDiffGenerator.stopProcess"></a> 294 </dl>
295 <a NAME="HgDiffGenerator.stopProcess" ID="HgDiffGenerator.stopProcess"></a>
228 <h4>HgDiffGenerator.stopProcess</h4> 296 <h4>HgDiffGenerator.stopProcess</h4>
229 <b>stopProcess</b>(<i></i>) 297 <b>stopProcess</b>(<i></i>)
298
230 <p> 299 <p>
231 Public slot to stop the diff process. 300 Public slot to stop the diff process.
232 </p> 301 </p>
233 <div align="right"><a href="#top">Up</a></div> 302 <div align="right"><a href="#top">Up</a></div>
234 <hr /> 303 <hr />

eric ide

mercurial