| Summary: | make commit comment templates repository or project specific | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Steffen Pingel <steffen.pingel> | ||||||||||||
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | enhancement | ||||||||||||||
| Priority: | P3 | CC: | bflat1, mik.kersten, pombredanne, robert.elves, stepper | ||||||||||||
| Version: | unspecified | Keywords: | noteworthy | ||||||||||||
| Target Milestone: | 2.2 | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Bug Depends on: | 210823 | ||||||||||||||
| Bug Blocks: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Steffen Pingel
Could you post an example of what you would want a commit comment to look like? Also note bug 117517. Sorry for the dupe. Generic templates as requested in bug 117517 are even better although these may need to be repository / connector specific. A commit comment in Trac could look like: <prefix>: <description> (refs <#id>) Let's keep this open in case we do need the templates to be configured per-repository. We could support that with a similar global vs. project-specific settings mechanism that Eclipse has all over the place. *** Bug 157342 has been marked as a duplicate of this bug. *** Some projects (even within the same repository) require some weird comment templates. So, it does make sense to allow project-specific templates configuration. It might be related to project linking feature, and in some cases we could use some 3rd party metadata that could give us info about used templates. Agreed, so I set the milestone for 2.0. I can't currently take this on so keeping as helpwanted. It would be great if the template was stored in the .settings/org.eclipse.mylar.tasklist.prefs file so Mylar would pick it up when checking out a project. Mik, I'd be interested in looking into this for post 2.0. (In reply to comment #7) > It would be great if the template was stored in the > .settings/org.eclipse.mylar.tasklist.prefs file so Mylar would pick it up when > checking out a project. If we do that, I'd suggest to abstract this stuff trough extension point similar to projectLinkProviders. So, we could, for example, store those templates within svn properties... Need to defer post 2.0. Created attachment 80749 [details]
patch
The patch adds a new properties page "Mylyn Team" that allows a per project configuration of the commit comment template.
Created attachment 80750 [details]
mylyn/context/zip
Steffen, this is really cool! Rob, Mik, would you review this? I will attach a new patch shortly that optimizes the lookup for the repository template: Instead of checking the project of the first resource in the changeset it iterates through all resources until a resource is found that has a customized template. Also the UI could be improved. Currently the patch adds a "Mylyn Team" top-level page to the project properties dialog which seems a bit too visible considering that I wouldn't expect many people to use this feature. Created attachment 80990 [details]
patch 2nd iteration
Maybe it should be a subpage under Task Repository node. Bit weird, but show that is is also related. (In reply to comment #15) > Maybe it should be a subpage under Task Repository node. Bit weird, but show > that is is also related. Yes, I rejected that idea for the same reason. Rob and I discussed ways to present it: 1) Make the current Task Repository page the top-level node and rename it to Mylyn. The new page would be a sub-node named Team. 2) Make the new page a top-level page named Mylyn and make Task Repositories a sub-node of that. 3) Have two separate top-level nodes. Preferences? I am leaning towards (1). Personally I really don't like empty top level pages. "Mylyn" and "Team" are too generic. I think it is better to call the latter one "Commit Template". For the 3rd option, "Mylyn Task Repository" and "Mylyn Commit Template" are too long. On the other hand those are pretty much cosmetic issues not worth to discuss because Mik will outrule the UI anyways. If it helps to get this patch in faster, I can live with option 1. :-) Great stuff Steffen. Before applying we need a test of the core functionality. You could mock up a new project (see mylyn.java or mylyn.resources tests for code for programatically creating and deleting projects), set the template, then programatically generate the commit message to make sure that the content is used. In terms of preference pages, the points above make sense. The Java Editor page has a similar problem. For now I suggest going with (1). A reason for this is that it addresses the "Task Tags" being confusing and right below Task Repository. I'm not sure it's the right solution long-term so let's review before 2.2 goes out. Created attachment 81806 [details]
patch with test cases
Created attachment 81807 [details]
mylyn/context/zip
Nice. Patch applied. Added to Weekly New & Noteworthy. Steffen, can you please confirm that per-repository template will be used when parsing commit comments for task ids in Synchronize and History views? I did not add any specific support for that. Is it possible that the project-specific commit templates are not considered anymore by Mylyn? I found that I had to change the workspace-global preference in order to see the change in the Git staging view. That is tracked here: bug 348744: Staging view does not respect project-specific commit message template. Thanks! |