Plugins/VcsPlugins/vcsMercurial/HgDialog.py

changeset 3310
a2032ed66aec
parent 3302
e92f0dd51979
child 3484
645c12de6b0c
equal deleted inserted replaced
3309:b5f782f7d43b 3310:a2032ed66aec
25 25
26 It starts a QProcess and displays a dialog that 26 It starts a QProcess and displays a dialog that
27 shows the output of the process. The dialog is modal, 27 shows the output of the process. The dialog is modal,
28 which causes a synchronized execution of the process. 28 which causes a synchronized execution of the process.
29 """ 29 """
30 def __init__(self, text, hg=None, parent=None): 30 def __init__(self, text, hg=None, useClient=True, parent=None):
31 """ 31 """
32 Constructor 32 Constructor
33 33
34 @param text text to be shown by the label (string) 34 @param text text to be shown by the label (string)
35 @param hg reference to the Mercurial interface object (Hg) 35 @param hg reference to the Mercurial interface object (Hg)
36 @param useClient flag indicating to use the command server client
37 if possible (boolean)
36 @param parent parent widget (QWidget) 38 @param parent parent widget (QWidget)
37 """ 39 """
38 super().__init__(parent) 40 super().__init__(parent)
39 self.setupUi(self) 41 self.setupUi(self)
40 42
42 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 44 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
43 45
44 self.proc = None 46 self.proc = None
45 self.username = '' 47 self.username = ''
46 self.password = '' 48 self.password = ''
47 self.__hgClient = hg.getClient() 49 if useClient:
50 self.__hgClient = hg.getClient()
51 else:
52 self.__hgClient = None
48 self.vcs = hg 53 self.vcs = hg
49 54
50 self.outputGroup.setTitle(text) 55 self.outputGroup.setTitle(text)
51 56
52 self.show() 57 self.show()

eric ide

mercurial