Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 76939

Summary: [Wizards] Multi-line check-in comments no longer work
Product: [Eclipse Project] Platform Reporter: Lance Eason <leason>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P5 CC: gabriele.garuglieri, remy.suen, tomasz.zarna
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Lance Eason CLA 2004-10-25 11:04:02 EDT
We have a multi-line template for our CVS check-in comments.  As of 3.0 RC1 
these multi-line comments worked fine.  As of 3.1 M2 Eclipse is only sending 
the last line of the comment which causes the check-in to fail.
Comment 1 Michael Valenta CLA 2004-10-25 12:33:28 EDT
The general multi-line case works fine so it must be related to the use of a 
template. There was code added at some point that would strip the leading or 
trailing portion of a comment it it matched the template exactly. Perhaps this 
code is behaving improperly. Are you modifying text inside the template or 
just appending to it?
Comment 2 Lance Eason CLA 2004-10-25 22:14:36 EDT
Yep.  That looks like the behavior exactly.  I had appended one line to the end 
of the template comment and hadn't changed anything in the template itself.  
CVS complained the comment was malformed and the comment history only showed 
the last line so I assumed it was a multi-line issue.  I resubmitted taking out 
all the line breaks and everything worked reinforcing that belief.  (Now in 
light of your comment I see that the real reason that worked was that it now no 
longer exactly matched the template)

Just went back and tested and if I fill in something in the template itself 
everything is happy, so it's just the case of the pure appending to the end.
Comment 3 Michael Valenta CLA 2004-10-26 07:02:26 EDT
So is it valid for you to just append to the template when committing and not 
actually modify portions within the template? It seems to me that a template 
is of little use if text is only appended. I must admit that I don't use 
templates and the feature that is causing problems here was contributed by a 
non-committer. Does the command line client strip the unmodified leading 
template portion?
Comment 4 Lance Eason CLA 2004-10-27 10:13:29 EDT
Yes and no.  In our case our template is for tracking issue #'s associated with 
the change.  So it looks something like this:

   Issue #:
   Description:

I didn't have an issue number for the change I had made (and our process 
doesn't require an issue # for every change) so I just entered a description.  
For our particular template best practice would have been if I did have an 
issue number and entered it (thus changing something in the middle of the 
template) but imagine a simpler template:

   Issue #:

This template would *never* work with the current code because every entry will 
only consist of an append to the end of the template, there's nothing in the 
middle to fill out.

The command line doesn't modify the check-in comment in any way regardless of 
whether a template is used or not.  I don't have the context of why the change 
was initially made but it feels wrong to me.  Every place I've worked where we 
used CVS the comment was actually being verified during check-in to make sure 
it had the fields specified by the template.  If you strip off those fields in 
certain situations (even if some of them weren't populated as in my case) the 
check-in breaks.
Comment 5 Michael Valenta CLA 2004-10-27 10:55:32 EDT
We will need to have a look at how the command line client behaves and emulate 
that percisely.
Comment 6 Michael Valenta CLA 2005-03-30 10:57:14 EST
No time for this in 3.1
Comment 7 Gabriele Garuglieri CLA 2006-02-21 03:12:38 EST
We are going to implement templates usage in our group and this is hitting us too.
Is it possible for you to solve it within 3.2 timeframe?

Thanks,  Gbariele
Comment 8 Michael Valenta CLA 2006-02-21 06:21:29 EST
We'll try but I can't guarantee that we'll have time. Any chance you could provide a patch?
Comment 9 Gabriele Garuglieri CLA 2006-02-22 02:16:01 EST
Michael, unfortuntely resources shortage, of which the most precious is time, is a chronical illness of which i suffer too and i don't see any relief in any foreseeable future.
I like eclipse and i like coding and i'd like to cooperate to the project, but my job resposibilities grew in terms of number of controlled projects and peoples to the point that i have almost no time left to dirty my hands with code.
The only cooperation i could afford was to test each new release providing feedback when discovering bugs or enhanceable areas, but also that, as you can see doing a search with my name, steadily decreased lately.

So the only way left is to timidly request, hoping that some kind soul will consider that worth to be pursued.

Cheers, Gabriele
Comment 10 Michael Valenta CLA 2006-04-12 08:50:23 EDT
We didn't have time to address this in 3.2 but hopefully we will have time in 3.3.
Comment 11 Michael Valenta CLA 2006-08-17 09:24:18 EDT
We do not plan to address this in 3.3 but patches will be gratefully accepted.
Comment 12 Tomasz Zarna CLA 2007-11-12 05:24:55 EST
Lance, Gabriele it seems to me that the issue has been resolved. I will mark the bug as WORKSFORME (I've checked it on N20071105-0010), but please don't hesitate to let me know if you are still encountering any other problems with the multi-line templates.