Changed some Mercurial dialogs asking for a (tag, branch,...) name to convert spaces to underscores because spaces are not really recommended.

Wed, 19 Mar 2014 19:26:30 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 19 Mar 2014 19:26:30 +0100
changeset 3408
b6e6a7062d12
parent 3407
07966c6b5565
child 3410
b5e18d7f3501

Changed some Mercurial dialogs asking for a (tag, branch,...) name to convert spaces to underscores because spaces are not really recommended.

Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkRenameDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgBranchInputDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgTagDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesNewPatchDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesQueueManagementDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveDataDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgUnshelveDataDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -203,8 +203,8 @@
             rev = ""
         
         if self.__mode == self.MOVE_MODE:
-            name = self.nameCombo.currentText()
+            name = self.nameCombo.currentText().replace(" ", "_")
         else:
-            name = self.nameEdit.text()
+            name = self.nameEdit.text().replace(" ", "_")
         
         return rev, name
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkRenameDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkRenameDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -68,4 +68,7 @@
         @return tuple naming the new and old bookmark names
             (string, string)
         """
-        return self.nameEdit.text(), self.bookmarkCombo.currentText()
+        return (
+            self.nameEdit.text().replace(" ", "_"),
+            self.bookmarkCombo.currentText().replace(" ", "_")
+        )
--- a/Plugins/VcsPlugins/vcsMercurial/HgBranchInputDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgBranchInputDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -52,5 +52,5 @@
         @return tuple of branch name (string) and a flag indicating to
             commit the branch (boolean)
         """
-        return (self.branchComboBox.currentText(),
+        return (self.branchComboBox.currentText().replace(" ", "_"),
                 self.commitCheckBox.isChecked())
--- a/Plugins/VcsPlugins/vcsMercurial/HgTagDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgTagDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -91,7 +91,7 @@
         
         @return tuple of two strings and int (tag, revision, tag operation)
         """
-        tag = self.tagCombo.currentText()
+        tag = self.tagCombo.currentText().replace(" ", "_")
         tagOp = 0
         if self.createTagButton.isChecked():
             if self.globalTagButton.isChecked():
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesNewPatchDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesNewPatchDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -126,5 +126,5 @@
         dateData = (self.dateGroup.isChecked(),
                     self.currentDateCheckBox.isChecked(),
                     self.dateTimeEdit.dateTime().toString("yyyy-MM-dd hh:mm"))
-        return (self.nameEdit.text(), self.messageEdit.toPlainText(),
-                userData, dateData)
+        return (self.nameEdit.text().replace(" ", "_"),
+                self.messageEdit.toPlainText(), userData, dateData)
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesQueueManagementDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesQueueManagementDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -174,7 +174,7 @@
         """
         name = ""
         if self.__mode == HgQueuesQueueManagementDialog.NAME_INPUT:
-            name = self.nameEdit.text()
+            name = self.nameEdit.text().replace(" ", "_")
         elif self.__mode == HgQueuesQueueManagementDialog.QUEUE_INPUT:
             selItems = self.queuesList.selectedItems()
             if selItems:
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -84,4 +84,4 @@
         if self.namedButton.isChecked():
             selectedPatch = self.nameCombo.currentText()
         
-        return self.nameEdit.text(), selectedPatch
+        return self.nameEdit.text().replace(" ", "_"), selectedPatch
--- a/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveDataDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveDataDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -45,7 +45,7 @@
         else:
             dateTime = QDateTime()
         return (
-            self.nameEdit.text(),
+            self.nameEdit.text().replace(" ", "_"),
             dateTime,
             self.messageEdit.text(),
             self.addRemoveCheckBox.isChecked(),
--- a/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgUnshelveDataDialog.py	Wed Mar 19 18:47:05 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgUnshelveDataDialog.py	Wed Mar 19 19:26:30 2014 +0100
@@ -45,6 +45,6 @@
             to keep the shelved change (boolean)
         """
         return (
-            self.nameComboBox.currentText(),
+            self.nameComboBox.currentText().replace(" ", "_"),
             self.keepCheckBox.isChecked()
         )

eric ide

mercurial