Plugins/VcsPlugins/vcsMercurial/HgBackoutDialog.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1017
919147f2b518
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
10 from PyQt4.QtCore import pyqtSlot, QDateTime 10 from PyQt4.QtCore import pyqtSlot, QDateTime
11 from PyQt4.QtGui import QDialog, QDialogButtonBox 11 from PyQt4.QtGui import QDialog, QDialogButtonBox
12 12
13 from .Ui_HgBackoutDialog import Ui_HgBackoutDialog 13 from .Ui_HgBackoutDialog import Ui_HgBackoutDialog
14 14
15
15 class HgBackoutDialog(QDialog, Ui_HgBackoutDialog): 16 class HgBackoutDialog(QDialog, Ui_HgBackoutDialog):
16 """ 17 """
17 Class implementing a dialog to enter the data for a backout operation. 18 Class implementing a dialog to enter the data for a backout operation.
18 """ 19 """
19 def __init__(self, tagsList, branchesList, parent = None): 20 def __init__(self, tagsList, branchesList, parent=None):
20 """ 21 """
21 Constructor 22 Constructor
22 23
23 @param tagsList list of tags (list of strings) 24 @param tagsList list of tags (list of strings)
24 @param branchesList list of branches (list of strings) 25 @param branchesList list of branches (list of strings)
47 48
48 def getParameters(self): 49 def getParameters(self):
49 """ 50 """
50 Public method to retrieve the backout data. 51 Public method to retrieve the backout data.
51 52
52 @return tuple naming the revision, a flag indicating a 53 @return tuple naming the revision, a flag indicating a
53 merge, the commit date, the commit user and a commit message 54 merge, the commit date, the commit user and a commit message
54 (string, boolean, string, string, string) 55 (string, boolean, string, string, string)
55 """ 56 """
56 if self.numberButton.isChecked(): 57 if self.numberButton.isChecked():
57 rev = str(self.numberSpinBox.value()) 58 rev = str(self.numberSpinBox.value())
72 if self.messageEdit.toPlainText(): 73 if self.messageEdit.toPlainText():
73 msg = self.messageEdit.toPlainText() 74 msg = self.messageEdit.toPlainText()
74 else: 75 else:
75 msg = self.trUtf8("Backed out changeset <{0}>.").format(rev) 76 msg = self.trUtf8("Backed out changeset <{0}>.").format(rev)
76 77
77 return (rev, 78 return (rev,
78 self.mergeCheckBox.isChecked, 79 self.mergeCheckBox.isChecked,
79 date, 80 date,
80 self.userEdit.text(), 81 self.userEdit.text(),
81 msg 82 msg
82 ) 83 )

eric ide

mercurial