eric7/Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py

branch
eric7
changeset 8624
5192a2592324
parent 8322
b422b4e77d19
child 8629
1b58dc890b87
equal deleted inserted replaced
8623:fced5aa98d41 8624:5192a2592324
50 """ 50 """
51 Protected method called when the dialog is about to be shown. 51 Protected method called when the dialog is about to be shown.
52 52
53 @param evt the event (QShowEvent) 53 @param evt the event (QShowEvent)
54 """ 54 """
55 commitMessages = self.__vcs.getPlugin().getPreferences('Commits') 55 commitMessages = self.__vcs.vcsCommitMessages()
56 self.recentComboBox.clear() 56 self.recentComboBox.clear()
57 self.recentComboBox.addItem("") 57 self.recentComboBox.addItem("")
58 for message in commitMessages: 58 for message in commitMessages:
59 abbrMsg = message[:60] 59 abbrMsg = message[:60]
60 if len(message) > 60: 60 if len(message) > 60:
116 well, name of the author and date/time of the commit 116 well, name of the author and date/time of the commit
117 @rtype tuple of str, bool, bool, str, str 117 @rtype tuple of str, bool, bool, str, str
118 """ 118 """
119 msg = self.logEdit.toPlainText() 119 msg = self.logEdit.toPlainText()
120 if msg: 120 if msg:
121 commitMessages = self.__vcs.getPlugin().getPreferences('Commits') 121 self.__vcs.vcsAddCommitMessage(msg)
122 if msg in commitMessages:
123 commitMessages.remove(msg)
124 commitMessages.insert(0, msg)
125 no = self.__vcs.getPlugin().getPreferences("CommitMessages")
126 del commitMessages[no:]
127 self.__vcs.getPlugin().setPreferences(
128 'Commits', commitMessages)
129 122
130 author = self.authorComboBox.currentText() 123 author = self.authorComboBox.currentText()
131 if author: 124 if author:
132 commitAuthors = self.__vcs.getPlugin().getPreferences( 125 commitAuthors = self.__vcs.getPlugin().getPreferences(
133 'CommitAuthors') 126 'CommitAuthors')

eric ide

mercurial