This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 9344 - "Update" or "Checkout" commands add newline at the end of the file.
Summary: "Update" or "Checkout" commands add newline at the end of the file.
Status: CLOSED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 3.x
Hardware: Other Windows ME/2000
: P3 critical (vote)
Assignee: _ rgreig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-01 17:00 UTC by Jiri Kovalsky
Modified: 2007-01-04 17:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2001-02-01 17:00:15 UTC
Development build of NetBeans #116 (2001-02-01) on Windows 2000 with JDK 1.3.

Description:
============
This bug doesn't occur if there is already a newline character at the end of the
file :-) But if file ends with some meaningful text and is committed into the
repository and then checked out it is changed in above described way. The most
interesting seems to me that "Diff" doesn't find any differencies.

Steps to reproduce:
===================
1. Mount JavaCVS filesystem and open arbitrary [Up-to-date] file.
2. Write some text at the last line, "Save" it and "Commit" this [LMod] file.
3. Now perform "Checkout" on this file and "Open" it to verify the bug.
Comment 1 _ rgreig 2001-02-26 00:46:03 UTC
Assigning to RG.
Comment 2 _ rgreig 2001-02-26 00:47:47 UTC
This looks to be a bug in the FileHandlers.
Comment 3 _ rgreig 2001-02-26 17:15:55 UTC
Bug was because the AbstractFileHandler relied on using BufferedReader.readLine
() which makes it impossible to figure out whether you're dealing with a line 
with a newline at the end or not. Now uses a different approach.

Classes changed:
org.netbeans.lib.cvsclient.file.AbstractFileHandler
Comment 4 Jiri Kovalsky 2001-06-07 19:45:14 UTC
Verified in development build #205.
Comment 5 Quality Engineering 2003-07-01 12:48:23 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.