Bug 167980 - [Wizards] previous commit messages do not appear in commit dialog
Summary: [Wizards] previous commit messages do not appear in commit dialog
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-12-13 18:35 EST by Jae Gangemi CLA
Modified: 2007-11-13 10:55 EST (History)
1 user (show)

See Also:


Attachments
screen shot (52.25 KB, image/png)
2006-12-18 10:00 EST, Jae Gangemi CLA
no flags Details
comment history (1.48 KB, text/xml)
2006-12-18 14:56 EST, Jae Gangemi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jae Gangemi CLA 2006-12-13 18:35:57 EST
Build ID: M20060921-0945

Steps To Reproduce:
1) make change to resource
2) commit the changes, causing the commit wizard to appear
3) try to pick a previously used message, none appear


More information:
this occurs for me on os x - i tried a fresh install of eclipse, but the problem still appears.
Comment 1 Michael Valenta CLA 2006-12-18 08:48:02 EST
This problem is usually due to a permissions problem. Make sure that the file at the location <your workspace folder./.plugins/org.eclipse.team.cvs.ui/commitCommentHistory.xml is writtable.
Comment 2 Jae Gangemi CLA 2006-12-18 10:00:47 EST
Created attachment 55857 [details]
screen shot

i checked the permissions - they are correct and i see the entries being written to the xml file, but they don't appear w/in the UI (i've attached a screen shot) - perhaps this needs to be re-assigned?
Comment 3 Michael Valenta CLA 2006-12-18 14:28:47 EST
That's very odd. Is there anything in your error log? 
Comment 4 Jae Gangemi CLA 2006-12-18 14:56:42 EST
Created attachment 55867 [details]
comment history
Comment 5 Jae Gangemi CLA 2006-12-18 14:57:20 EST
not that i can see - i've attached the comment history xml file in case there is something screwy going on there.
Comment 6 Jae Gangemi CLA 2006-12-18 15:08:14 EST
sorry for the spam...

after looking at the xml file, i notice the comments aren't stored in CDATA blocks, so i'm thinking something in there is breaking the xml parsing.

i can confirm this by deleting the comment history file, committing a resource w/ a simple message "test", and then attempt to commit another resource and click the drop down - the previous message appears.
Comment 7 Michael Valenta CLA 2006-12-21 09:07:12 EST
So, are you saying that now it is working for you? I tried your file on windows but it works for me there.
Comment 8 Jae Gangemi CLA 2006-12-21 10:27:21 EST
yes and no :)

any commit comments that i prefix w/ a '-' do not appear in the previous list drops down.

if the comment doesn't start w/ a '-', the comment appears. i'm not sure if this is mac specific or not.

i do notice that where the comment should be in the drop down list is a 'beveled' line that goes all the way across the drop down - you can see this in the screen shot. 
Comment 9 Jae Gangemi CLA 2007-06-21 16:16:15 EDT
i see this has the 'helpwanted' tag now, so i'm guessing there isn't any rush to fix this. 

it seems that wrapping the commit messages inside a CDATA block would resolve these issues. i do notice this same behavior using the subclipse plugin as well, so i'm thinking that there is some shared piece of code responsible for this.

i'd be willing to submit a patch to fix this issue if 1) the proposed CDATA solution is acceptable and 2) if someone could point me in the general direction of the code responsible for writing/reading the 'commitCommentHistory.xml' history file.
Comment 10 Michael Valenta CLA 2007-06-21 16:53:21 EDT
The class that handles the comment serialization is the RepositoryManager in the org.eclipse.team.cvs.ui plug-in. It makes use of an XMLWrite class in the same plug-in. Using a CDATA is fine with me. The only requirement is that the old format must still be readable so that comment history is preserved across an upgrade.
Comment 11 Jae Gangemi CLA 2007-11-12 14:35:46 EST
it looks like this has auto-resolved itself as of the 3.4M3 milestone release.
Comment 12 Tomasz Zarna CLA 2007-11-13 10:55:58 EST
Affirmative, it works for me in I20071101-2000 on Mac OS X.