# eric7.Plugins.VcsPlugins.vcsMercurial.HgDialog

Module implementing a dialog starting a process and showing its output.

### Global Attributes

None

### Classes

HgDialog | Class implementing a dialog starting a process and showing its output.

### Functions

None

## HgDialog

Class implementing a dialog starting a process and showing its output.

It starts a QProcess and displays a dialog that shows the output of the process. The dialog is modal, which causes a synchronized execution of the process.

### Derived from

QDialog, Ui_HgDialog

### Class Attributes

None

### Class Methods

None

### Methods

HgDialog | Constructor
__finish | Private slot called when the process finished or the user pressed the button.
__getInput | Private method to get some input from the user.
__showError | Private slot to show some error.
__showOutput | Private slot to show some output.
hasAddOrDelete | Public method to check, if the last action contained an add or delete.
normalExit | Public method to check for a normal process termination.
normalExitWithoutErrors | Public method to check for a normal process termination without error messages.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
startProcess | Public slot used to start the process.

### Static Methods

None

#### HgDialog (Constructor)

HgDialog(text, hg=None, useClient=True, parent=None)

Constructor

text
  text to be shown by the label (string)
hg
  reference to the Mercurial interface object (Hg)
useClient
  flag indicating to use the command server client if possible (boolean)
parent
  parent widget (QWidget)

#### HgDialog.__finish

__finish()

Private slot called when the process finished or the user pressed the button.

#### HgDialog.__getInput

__getInput(size, message)

Private method to get some input from the user.

size (int)
  maximum length of the requested input
message (str)
  message sent by the server

Return:
  tuple containing data entered by the user and a flag indicating a password input

Return Type:
  tuple of (str, bool)

#### HgDialog.__showError

__showError(out)

Private slot to show some error.

out
  error to be shown (string)

#### HgDialog.__showOutput

__showOutput(out)

Private slot to show some output.

out
  output to be shown (string)

#### HgDialog.hasAddOrDelete

hasAddOrDelete()

Public method to check, if the last action contained an add or delete.

Return:
  flag indicating the presence of an add or delete (boolean)

#### HgDialog.normalExit

normalExit()

Public method to check for a normal process termination.

Return:
  flag indicating normal process termination (boolean)

#### HgDialog.normalExitWithoutErrors

normalExitWithoutErrors()

Public method to check for a normal process termination without error messages.

Return:
  flag indicating normal process termination (boolean)

#### HgDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### HgDialog.startProcess

startProcess(args, showArgs=True, environment=None, client=None)

Public slot used to start the process.

args (list of str)
  list of arguments for the process
showArgs (bool)
  flag indicating to show the arguments
environment (dict)
  dictionary of environment settings to add or change for the git process
client (HgClient)
  reference to a non-standard command client

Return:
  flag indicating a successful start of the process

Return Type:
  bool

Up