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

Bug 331244

Summary: Default text "New file." not working for "Prepare Changelog"
Product: [Tools] Linux Tools Reporter: Severin Gehwolf <sgehwolf>
Component: ChangeLogAssignee: Jeff Johnston <jjohnstn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jjohnstn, linux.changelog-inbox, sgehwolf
Version: 0.7.0   
Target Milestone: 0.7   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Changelog plugin PSF none

Description Severin Gehwolf CLA 2010-11-26 16:06:18 EST
Created attachment 183959 [details]
Changelog plugin PSF

Steps to reproduce:

1. Checkout ChangeLog code (may use attached PSF)
2. Remove fragment.xml from org.eclipse.linuxtools.changelog.cparser
3. Add new class in src/org/eclipse/linuxtools/changelog/parsers (Test.java say)
4. Select project org.eclipse.linuxtools.changelog.cparser
5. "Project" => "Prepare Changelog"

Result:
2010-11-26  Severin Gehwolf  <sgehwolf@redhat.com>

	* fragment.xml: Removed.
	* src/org/eclipse/linuxtools/changelog/parsers/Test.java: 

Expected:
2010-11-26  Severin Gehwolf  <sgehwolf@redhat.com>

	* fragment.xml: Removed.
	* src/org/eclipse/linuxtools/changelog/parsers/Test.java: New file.
Comment 1 Severin Gehwolf CLA 2010-11-26 16:16:35 EST
$ rpm -q eclipse-changelog
eclipse-changelog-2.6.7-5.fc14.x86_64

.changelog.core 2.6.7
.changelog.parsers.java 2.6.3
Comment 2 Jeff Johnston CLA 2010-11-26 19:25:48 EST
There is a bug in the GNU Formatter for ChangeLog whereby the last line in the entry does not add any default content.  The entry is sorted so removed files come first, then new files, then modified files.  If there are no modified files and there are new files or removed files, the last entry will be incorrect because the default content is the "New file" or "Removed file" message.

This has been corrected in trunk and should be in branch 0.7 when it is cut.
Comment 3 Severin Gehwolf CLA 2010-11-29 09:23:14 EST
(In reply to comment #2)
> There is a bug in the GNU Formatter for ChangeLog whereby the last line in the
> entry does not add any default content.  The entry is sorted so removed files
> come first, then new files, then modified files.  If there are no modified
> files and there are new files or removed files, the last entry will be
> incorrect because the default content is the "New file" or "Removed file"
> message.
> 
> This has been corrected in trunk and should be in branch 0.7 when it is cut.

Thanks Jeff. I'll add a regression test to the GNU Formatter tests for those cases.
Comment 4 Severin Gehwolf CLA 2010-12-02 09:30:27 EST
(In reply to comment #3)
> Thanks Jeff. I'll add a regression test to the GNU Formatter tests for those
> cases.

Regression test for this bug is part of the GNUFormat test suite in trunk (Revision 27047).