Addition of change set messages in the commit message history
Up until now, selecting the Commit action (from the Synchronizing Team view) on local change sets did not get the commit message stored in the commit messages history because the saving was guarded by the condition if (!commitMessage.equals(options.defaultCommitMessage))
.
Basically, this asks the question "was the commit message a default message?" and messages are saved if the answer is "No".
Unfortunately, CommitSynchronizeOperation
initializes options.defaultCommitMessage
to the commit message, but this is necessary to have the configured change set comment show up in the dialog. Therefore, the only way at commit time that the commit message could be different from the "default" (more accurately, "initial") message, is when the user has modified the message before clicking OK. This rarely if ever happens in my specific case as the point of using local change sets is preparing commits.
I have changed the way that the question "was the commit message a default message?" is answered. Now, even when the change set message has not been changed between opening the dialog and clicking OK, it will pass the test if it doesn't start with the default name prefix that change sets receive when they are created. It remains possible to use the default changeset name when committing files.
To sum up:
- Previously, change set messages unmodified before clicking OK in the Commit dialog were not saved.
- From now on, change set messages unmodified before clicking OK will be saved.