Bug 249572 - commit message not perfectly respecting commit template
Summary: commit message not perfectly respecting commit template
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.3.2   Edit
Assignee: Shawn Minto CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 250378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-03 04:08 EDT by Mauro Molinari CLA
Modified: 2010-02-17 20:01 EST (History)
3 users (show)

See Also:


Attachments
mylyn/context/zip (2.00 KB, application/octet-stream)
2010-02-17 11:58 EST, Shawn Minto CLA
no flags Details
patch (2.96 KB, patch)
2010-02-17 17:31 EST, Shawn Minto CLA
no flags Details | Diff
patch (4.02 KB, patch)
2010-02-17 19:36 EST, Shawn Minto CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mauro Molinari CLA 2008-10-03 04:08:03 EDT
Build ID: M20080911-1700

Steps To Reproduce:
I'm using the default commit template:

${connector.task.prefix} ${task.key}: ${task.description} 
${task.url}

and I'm working with the local repository.

After updating Mylyn from 3.0.1 to 3.0.2 (and because of the fix for bug #242310), the commit message generated for my task changed from:

task 47: My task name

to:

taskMy task name

The problem is this: given that ${task.key} is not evaluated to task id anymore, why is " : " in the template cut?
I would expected to see a space after "task", and a colon followed by a space before "My task name", so:

task : My task name

More information:
I'm marking this bug as "major" because I think it's severity is increased by the fact that I think the change caused by the fix #242310 is by itself a breaking change and in this situation the comment generated for local tasks using the default template is ugly.
Comment 1 Steffen Pingel CLA 2008-10-03 13:41:52 EDT
I'll consider this as part of the 3.1 plan.
Comment 2 Steffen Pingel CLA 2009-08-04 16:27:49 EDT
*** Bug 250378 has been marked as a duplicate of this bug. ***
Comment 3 Avner Linder CLA 2009-09-02 08:28:24 EDT
Any plans to fix this soon?

one of consequences is that at SVN the default commit message is missing a space between the word "task - Complete" and the task title.

For example: "task - Completedevelop a new feature xyz"

this is a little annoying, to add the white-space every time I commit changes.

See also subclipse bug report 950 (closed as duplicate of this bug):
http://subclipse.tigris.org/issues/show_bug.cgi?id=950
Comment 4 Steffen Pingel CLA 2009-09-02 13:42:12 EDT
The bug is on the back log and will be considered when the next release is planned.
Comment 5 Shawn Minto CLA 2010-02-17 11:56:28 EST
This is now fixed. Trailing characters of a template variable were previously thrown away if the variable was not matched.  Now, we make sure to add these trailing characters so that spaces and punctuation are properly handled between variables that do not match anything on the task.

Steffen, do you think that this should be backported to the 3.3.x branch too?
Comment 6 Shawn Minto CLA 2010-02-17 11:58:36 EST
Created attachment 159339 [details]
mylyn/context/zip
Comment 7 Steffen Pingel CLA 2010-02-17 14:22:07 EST
Sure. Just post a patch and test case.
Comment 8 Shawn Minto CLA 2010-02-17 17:31:58 EST
Created attachment 159391 [details]
patch

Here is the patch steffen.
Comment 9 Shawn Minto CLA 2010-02-17 19:36:24 EST
Created attachment 159393 [details]
patch

Updated patch that was committed to the branch
Comment 10 Shawn Minto CLA 2010-02-17 19:36:54 EST
patch applied to the branch and head.
Comment 11 Steffen Pingel CLA 2010-02-17 20:01:14 EST
Thanks Shawn.