eric6/Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py

changeset 7396
c6399bce2c0b
parent 7360
9190402e4505
child 7414
d02ed92ef3b2
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py	Tue Feb 04 19:41:50 2020 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py	Tue Feb 04 19:43:37 2020 +0100
@@ -20,11 +20,14 @@
     """
     Class implementing a dialog to enter data for the Mercurial import command.
     """
-    def __init__(self, parent=None):
+    def __init__(self, vcs, parent=None):
         """
         Constructor
         
-        @param parent reference to the parent widget (QWidget)
+        @param vcs reference to the VCS object
+        @type Hg
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super(HgImportDialog, self).__init__(parent)
         self.setupUi(self)
@@ -33,6 +36,8 @@
         self.patchFilePicker.setFilters(self.tr(
             "Patch Files (*.diff *.patch);;All Files (*)"))
         
+        self.secretCheckBox.setEnabled(vcs.version >= (5, 3, 0))
+        
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
         
         self.__initDateTime = QDateTime.currentDateTime()
@@ -62,9 +67,10 @@
         Public method to retrieve the import data.
         
         @return tuple naming the patch file, a flag indicating to not commit,
-            a commit message, a commit date, a commit user, a strip count and
-            a flag indicating to enforce the import
-            (string, boolean, string, string, string, integer, boolean)
+            a commit message, a commit date, a commit user, a flag indicating
+            to commit with the secret phase, a strip count and a flag
+            indicating to enforce the import
+        @type tuple of (str, bool, str, str, str, bool, int, bool)
         """
         if self.dateEdit.dateTime() != self.__initDateTime:
             date = self.dateEdit.dateTime().toString("yyyy-MM-dd hh:mm")
@@ -73,4 +79,5 @@
         
         return (self.patchFilePicker.text(), self.noCommitCheckBox.isChecked(),
                 self.messageEdit.toPlainText(), date, self.userEdit.text(),
-                self.stripSpinBox.value(), self.forceCheckBox.isChecked())
+                self.secretCheckBox.isChecked(), self.stripSpinBox.value(),
+                self.forceCheckBox.isChecked())

eric ide

mercurial