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 48129 - CVS | UPDATE clobbers files
Summary: CVS | UPDATE clobbers files
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS library (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-30 06:31 UTC by _ gtzabari
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 _ gtzabari 2004-08-30 06:31:08 UTC
dev build 200408231800

I do CVS | UPDATE on a directory. This directory
contains many subdirectories and files and if you
walk the tree recursively you will find some files
that have been modified and need to be commited.

I run CVS | UPDATE to get a list of these files.
If one of the files is locked (in my case, it is a
VC++ suo -- solution configuration -- file) then
CVS | UPDATE will not list a bunch of files with
"M" (modified) beside them. Instead, it'll clobber
them with versions out of CVS. I do not have
"check out fresh copies" checked :)

Anyway, this is a major bug in my eyes so I've
flagged it as P1. I have actually lost a day's
work once and have experienced this bug at least
four other times since it first occured. Please
fix it before releasing 4.0 final.
Comment 1 Martin Entlicher 2004-08-30 11:15:41 UTC
Gili, do you use built-in CVS cupport, or command-line with an
external cvs.exe? If the external one, which version of cvs.exe do you
have?

Also, how do you have the file locked? Did you use "CVS Lock" command?
Comment 2 _ gtzabari 2004-08-30 14:38:35 UTC
Using the built-in CVS client. The file is locked because I have VC++
open with the project open so it keeps the file locked.
Comment 3 Martin Entlicher 2004-08-30 14:56:54 UTC
Aha, so I will try to simulate the "locked" file on Windows and test
what's happening. This seems to be a bug of the javacvs client library.
Comment 4 Martin Entlicher 2004-08-31 14:44:22 UTC
It was quite hard to reproduce. I've finally tried with Visual Studio.
It looks that the problem is not in the fact that the file is locked,
but the problem seems to be that it's hidden. The built-in client does
not send an entry about this file to the server, this is why it's not
mentioned as modified. And this is also probably the reason why the
server sends the repository version of the file on update, which the
client saves instead of the locally modified one.
Comment 5 Martin Entlicher 2004-08-31 14:52:42 UTC
Well, what I wrote above concerns only commit, not update!
The update seems to work O.K. for me so far.
Comment 6 Martin Entlicher 2004-08-31 15:13:02 UTC
The commit command now can commit also hidden files:

/cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/command/commit/CommitCommand.java,v
 <--  CommitCommand.java
new revision: 1.28; previous revision: 1.27

When the solution file is locked by Visual Studio, the update (when it
should really change the file) ends with an exception:
cvs server: Updating Solution1
Error: org.netbeans.lib.cvsclient.response.ResponseException:
C:\temp\CVS_WORK\VisualStudioProjects\Solution1\Solution1.suo (Access
is denied)
java.io.FileNotFoundException:
C:\temp\CVS_WORK\VisualStudioProjects\Solution1\Solution1.suo (Access
is denied)

This is O.K., since the file is locked. It also means, that the cvs
client can not alter the file content.
I was not able to reproduce any problem with update, perhaps the real
cause of problems was that the file was not committed.

Resolving as fixed, please try with the next version to see whether
the behavior is correct. Thanks.
Comment 7 _ gtzabari 2004-08-31 20:07:52 UTC
Martin,

I would like to clarify the situation. What would happen is that CVS |
UPDATE that the suo file was locked but then clobber all *remaining*.
That is, if CVS | UPDATE finds 5 modified files, but the first one is
the suo, it would clobber the remaining 4 files!!

Please fix this issue as well!