#177432 - Commit hooks data are not refreshing
Ondrej Vrabec <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.reviewers |
|---|---|
| Message-ID | <[email protected]> |
Description: 1) Commit changes and use commit hooks (select checkbox 'Add details to commit message and issue'. A comment is correctly added to the selected issue. 2) Commit other changes, this time without the hooks (do not expand 'Update issue' area). The same comment is added to the previous issue even though you didn't select a repository or issue. The problem applies to both Subversion and Mercurial modules, has been present for a long time and originally caused by #869aa841bb9d. Impact assessment: This causes unpleasant unexpected behavior - every time a user commits anything with the support of the hooks, hook's settings are cached and used the next time the user commits other files - even though the user has no intention to use them. So it may happen that a completely irrelevant comment is added to the issue. Risk assessment: safe - simplelfix - a flag is set when a user expands the 'Update issue' area, which as a side-effect resets the hooks and clears the cached settings. The hooks are then used during a commit only when the flag is set to true. Changeset: http://hg.netbeans.org/cdev/rev/b54c2dc26d3f