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

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

eric ide

mercurial