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

Thu, 18 Oct 2018 18:53:23 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 18 Oct 2018 18:53:23 +0200
changeset 6550
7c20da9a480a
parent 4212
530b953eb623
permissions
-rw-r--r--

Updated source docu.

<!DOCTYPE html>
<html><head>
<title>eric6.Plugins.VcsPlugins.vcsMercurial.HgDiffGenerator</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric6.Plugins.VcsPlugins.vcsMercurial.HgDiffGenerator</h1>
<p>
Module implementing a class to generate the output of the hg diff command.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#HgDiffGenerator">HgDiffGenerator</a></td>
<td>Class implementing the generation of output of the hg diff command.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="HgDiffGenerator" ID="HgDiffGenerator"></a>
<h2>HgDiffGenerator</h2>
<p>
    Class implementing the generation of output of the hg diff command.
</p><h3>Signals</h3>
<dl>
<dt>finished()</dt>
<dd>
emitted when all processes have finished
</dd>
</dl>
<h3>Derived from</h3>
QObject
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#HgDiffGenerator.__init__">HgDiffGenerator</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__extractFileName">__extractFileName</a></td>
<td>Private method to extract the file name out of a file separator line.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__finish">__finish</a></td>
<td>Private slot called when the process finished or the user pressed the button.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__getVersionArg">__getVersionArg</a></td>
<td>Private method to get a hg revision argument for the given revision.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__processFileLine">__processFileLine</a></td>
<td>Private slot to process a line giving the old/new file.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__processOutputLine">__processOutputLine</a></td>
<td>Private method to process the lines of output.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__readStderr">__readStderr</a></td>
<td>Private slot to handle the readyReadStandardError signal.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.__readStdout">__readStdout</a></td>
<td>Private slot to handle the readyReadStandardOutput signal.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.getResult">getResult</a></td>
<td>Public method to return the result data.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.start">start</a></td>
<td>Public slot to start the hg diff command.</td>
</tr><tr>
<td><a href="#HgDiffGenerator.stopProcess">stopProcess</a></td>
<td>Public slot to stop the diff process.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="HgDiffGenerator.__init__" ID="HgDiffGenerator.__init__"></a>
<h4>HgDiffGenerator (Constructor)</h4>
<b>HgDiffGenerator</b>(<i>vcs, parent=None</i>)
<p>
        Constructor
</p><dl>
<dt><i>vcs</i></dt>
<dd>
reference to the vcs object
</dd><dt><i>parent</i></dt>
<dd>
parent widget (QWidget)
</dd>
</dl><a NAME="HgDiffGenerator.__extractFileName" ID="HgDiffGenerator.__extractFileName"></a>
<h4>HgDiffGenerator.__extractFileName</h4>
<b>__extractFileName</b>(<i>line</i>)
<p>
        Private method to extract the file name out of a file separator line.
</p><dl>
<dt><i>line</i></dt>
<dd>
line to be processed (string)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
extracted file name (string)
</dd>
</dl><a NAME="HgDiffGenerator.__finish" ID="HgDiffGenerator.__finish"></a>
<h4>HgDiffGenerator.__finish</h4>
<b>__finish</b>(<i></i>)
<p>
        Private slot called when the process finished or the user pressed
        the button.
</p><a NAME="HgDiffGenerator.__getVersionArg" ID="HgDiffGenerator.__getVersionArg"></a>
<h4>HgDiffGenerator.__getVersionArg</h4>
<b>__getVersionArg</b>(<i>version</i>)
<p>
        Private method to get a hg revision argument for the given revision.
</p><dl>
<dt><i>version</i></dt>
<dd>
revision (integer or string)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
version argument (string)
</dd>
</dl><a NAME="HgDiffGenerator.__processFileLine" ID="HgDiffGenerator.__processFileLine"></a>
<h4>HgDiffGenerator.__processFileLine</h4>
<b>__processFileLine</b>(<i>line</i>)
<p>
        Private slot to process a line giving the old/new file.
</p><dl>
<dt><i>line</i></dt>
<dd>
line to be processed (string)
</dd>
</dl><a NAME="HgDiffGenerator.__processOutputLine" ID="HgDiffGenerator.__processOutputLine"></a>
<h4>HgDiffGenerator.__processOutputLine</h4>
<b>__processOutputLine</b>(<i>line</i>)
<p>
        Private method to process the lines of output.
</p><dl>
<dt><i>line</i></dt>
<dd>
output line to be processed (string)
</dd>
</dl><a NAME="HgDiffGenerator.__readStderr" ID="HgDiffGenerator.__readStderr"></a>
<h4>HgDiffGenerator.__readStderr</h4>
<b>__readStderr</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardError signal.
</p><p>
        It reads the error output of the process and inserts it into the
        error pane.
</p><a NAME="HgDiffGenerator.__readStdout" ID="HgDiffGenerator.__readStdout"></a>
<h4>HgDiffGenerator.__readStdout</h4>
<b>__readStdout</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardOutput signal.
</p><p>
        It reads the output of the process, formats it and inserts it into
        the contents pane.
</p><a NAME="HgDiffGenerator.getResult" ID="HgDiffGenerator.getResult"></a>
<h4>HgDiffGenerator.getResult</h4>
<b>getResult</b>(<i></i>)
<p>
        Public method to return the result data.
</p><dl>
<dt>Returns:</dt>
<dd>
tuple of lists of string containing lines of the diff, the
            list of errors and a list of tuples of filenames and the line
            into the diff output.
</dd>
</dl><a NAME="HgDiffGenerator.start" ID="HgDiffGenerator.start"></a>
<h4>HgDiffGenerator.start</h4>
<b>start</b>(<i>fn, versions=None, bundle=None, qdiff=False</i>)
<p>
        Public slot to start the hg diff command.
</p><dl>
<dt><i>fn</i></dt>
<dd>
filename to be diffed (string)
</dd><dt><i>versions=</i></dt>
<dd>
list of versions to be diffed (list of up to
            2 strings or None)
</dd><dt><i>bundle=</i></dt>
<dd>
name of a bundle file (string)
</dd><dt><i>qdiff=</i></dt>
<dd>
flag indicating qdiff command shall be used (boolean)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
flag indicating a successful start of the diff command
            (boolean)
</dd>
</dl><a NAME="HgDiffGenerator.stopProcess" ID="HgDiffGenerator.stopProcess"></a>
<h4>HgDiffGenerator.stopProcess</h4>
<b>stopProcess</b>(<i></i>)
<p>
        Public slot to stop the diff process.
</p>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial