--- a/Plugins/VcsPlugins/vcsMercurial/HgUserConfigHostFingerprintDialog.py Mon Jan 23 11:54:21 2017 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgUserConfigHostFingerprintDialog.py Mon Jan 23 17:53:07 2017 +0100 @@ -117,12 +117,21 @@ @param txt current text @type str """ + if txt != txt.strip(): + # get rid of whitespace + txt = txt.strip() + self.fingerprintEdit.setText(txt) + if txt.startswith(tuple( [h + ":" for h in HgUserConfigHostFingerprintDialog.supportedHashes])): parts = txt.split(":", 1) if len(parts) == 2: self.fingerprintEdit.setText(parts[1]) + hashIndex = self.hashComboBox.findText(parts[0].strip()) + if hashIndex > -1: + self.hashComboBox.setCurrentIndex(hashIndex) + self.__updateOkButton() def getData(self): @@ -137,7 +146,7 @@ else: fingerprint = "{0}:{1}".format( self.hashComboBox.currentText(), - self.fingerprintEdit.text() + self.fingerprintEdit.text().strip() ) - return self.hostEdit.text(), fingerprint + return self.hostEdit.text().strip(), fingerprint