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 240811 - can't find cvs diff when commit fail
Summary: can't find cvs diff when commit fail
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS library (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on: 191016
Blocks:
  Show dependency tree
 
Reported: 2014-01-22 10:39 UTC by fortruth
Modified: 2014-05-10 05:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
can't find cvs diff when commit fail (96.14 KB, image/png)
2014-01-22 10:43 UTC, fortruth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fortruth 2014-01-22 10:39:55 UTC
Product Version = NetBeans IDE 8.0 Beta (Build 201401141042)
Operating System = Linux version 3.11.0-15-generic running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = OpenJDK 64-Bit Server VM 23.7-b01

there are a lot change local, when commit, it report, server side have changes, then update from server-side, then the navigator don't show changes, and when diff  changes file, it also don't show difference, but in file it show lines changed.
Comment 1 fortruth 2014-01-22 10:43:10 UTC
Created attachment 144239 [details]
can't find cvs diff when commit fail
Comment 2 Ondrej Vrabec 2014-01-22 12:03:36 UTC
Does it change after a while? Possibly scanning was in progress and CVS was waiting until it finished. Does it go back if you run CVS -> Show Changes?
Comment 3 Ondrej Vrabec 2014-01-22 13:27:34 UTC
and don't forget to attach the messages.log after you loose the labels (http://wiki.netbeans.org/FaqLogMessagesFile)
Comment 4 noontide 2014-04-23 13:56:46 UTC
Product Version: NetBeans IDE 8.0 (Build 201403101706)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Mac OS X version 10.9.2 running on x86_64; UTF-8; en_US (nb)

I'm also seeing this issue. We have a source style checker (checkstyle) built into our CVS commit so that CVS rejects any commits if that source doesn't meet our style standards.

If a file (that doesn't meet our style) has changes it clearly shows as expected in the gutter of the editor, highlighted in the file tree and the file is listed using CVS show changes - everything is as expected.

If the file is committed, the CVS log shows that CVS is rejecting the commit, the Netbeans dialog is displayed that shows the errors, but the file is removed from CVS show changes and is no longer highlighted in the file tree. The only difference is when the file is opened, the differences are still shown in the gutter.

I've done some investigation using the CVS command line and I've found that the file date/time is not changed by the failed commit, however the date/time in the CVS/Entries file is changed by Netbeans on the failed commit. The CVS command line behaves like Netbeans and thinks that the file has no local changes because the date in the Entries file is equal (or after?) the date of the file itself.

If the CVS command line is used to commit the file the commit also fails, but the Entries file is not updated, so the status command still reports that the file has been locally modified.

I suspect this issue is caused by Netbeans updating the CVS/Entries file regardless of whether the commit was successful or not. This causes Netbeans to think there are no local changes in the file when in fact there are.
Comment 5 Ondrej Vrabec 2014-05-09 07:35:05 UTC
Not sure about the original report but what noontide reports is probably result of #191016 and its fix.
When a command fails the statuses of files should under no circumstances be set to up to date.

fix: http://hg.netbeans.org/core-main/rev/d69ca037d367
Comment 6 Quality Engineering 2014-05-10 05:32:23 UTC
Integrated into 'main-silver', will be available in build *201405100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d69ca037d367
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #240811 - can't find cvs diff when commit fail
when a commit fails then files should not be marked as up to date manually