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 198886 - CVS plugin locks files, causing external CVS operations to fail
Summary: CVS plugin locks files, causing external CVS operations to fail
Status: RESOLVED DUPLICATE of bug 198455
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 7.0
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 16:03 UTC by netacq_server
Modified: 2011-05-30 09:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log file (4.46 MB, application/octet-stream)
2011-05-25 21:41 UTC, netacq_server
Details

Note You need to log in before you can comment on or make changes to this bug.
Description netacq_server 2011-05-25 16:03:18 UTC
Whenever Mercurial is activated, CVS operations often fail or have bad side effects. E.g. files will be locked and fail to get moved during checkouts, updates, etc. The CVS workspace does not even have to be one which has a NetBeans project open to it. CVS operations fail from all sources (e.g. command line, WinCVS, etc). Deactivating Mercurial solves the problem. The resulting problems in CVS can be difficult to resolve and occasionally requires deleting a workspace and re-checking out. This issue was not present in 6.x verisons of NetBeans run on the same PC.
Comment 1 Tomas Stupka 2011-05-25 17:33:43 UTC
could it be that your cvs workspace is under a folder managed by mercurial?
Comment 2 netacq_server 2011-05-25 17:40:15 UTC
(In reply to comment #1)
> could it be that your cvs workspace is under a folder managed by mercurial?

No, we do not use mercurial. Our firm uses only CVS. The mercurial NetBeans plugin was populated with whatever defaults occur after installing NetBeans. I.e., no executbale path to mercurial exists.
Comment 3 Tomas Stupka 2011-05-25 18:23:33 UTC
don't get me wrong, asking just in case, but could it still be possible that you have the mercurial commandline client installed? as long it is on $path then the executable doesn't have to be specified. 

the mercurial plugin is accessing files over the commandline client, but that should happen only in case that those files are considered a part of a mercurial repository, speak they have a parent folder which contains the ".hg" metadata folder. Could you check if there isn't by chance one on your disk?

there are also some r/o io.File operations like .listFiles(), .exists() etc. done by the plugin but that should happen only once and for a very short time for an filesystem area. 

to find out more about what's going on:
1) start netbeans with the following switches
-J-Dorg.netbeans.modules.versioning.level=-1
-J-Dorg.netbeans.modules.mercurial.level=-1
-J-Dorg.netbeans.modules.mercurial.fileStatusCacheNewGeneration.level=-1

2) try to reproduce your scenario 
3) and then attach your messages.log file ($usedir/var/log/messages.log) to this issue 

thanks
Comment 4 netacq_server 2011-05-25 21:41:32 UTC
Created attachment 108509 [details]
messages.log file

Attached log shows NetBeans with mercurial activated. I opened NetBeans, ran a CVS update (via WinCVS) on a workspace that was not part of any project open in NetBeans, which exited partway through with: "cvs [update aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: Permission denied", and then closed NetBeans. The attachment is the resulting log from open to close of NetBeans.
Comment 5 Ondrej Vrabec 2011-05-26 07:02:39 UTC
> ran a CVS update (via WinCVS)
Does it happen when you run CVS->Update inside NetBeans (not externally)?
Comment 6 Ondrej Vrabec 2011-05-26 07:28:58 UTC
And one more thing, could you run the IDE with -J-Dorg.netbeans.modules.masterfs.watcher.disable=true and try the same again?
Comment 7 Ondrej Vrabec 2011-05-26 12:32:25 UTC
I don't think it has anything to do with mercurial. Mercurial does not access/read CVS metadata only occasionally calls java.io.File.exists/canRead/listFiles - i doubt these calls can block the external CVS client. Nevertheless keep mercurial disabled for a while and let us know if the problem reappears. If it does than it is not caused by mercurial support.

I think the problem is in the CVS support in NetBeans. The support is notified about a file's modification (during the update operation) and tries to get information about the changed files by reading data directly from CVS/Entries and thus blocking the external client from deleting/replacing the metadata file.

Please, try the switch (Comment #6) and report back the result.
Comment 8 netacq_server 2011-05-26 15:05:39 UTC
(In reply to comment #5)
> > ran a CVS update (via WinCVS)
> Does it happen when you run CVS->Update inside NetBeans (not externally)?

I've never been able to get NetBeans to communicate with our repository, or at least it doesn't appear to in any reasonable manner. Is there any recent documentation on configuring and using the CVS plugin? Much of what I've found doesn't seem to apply to recent NetBeans versions.
Comment 9 Ondrej Vrabec 2011-05-26 15:25:27 UTC
> Is there any recent documentation on configuring and using the CVS plugin?
Nothing has changed in the CVS support or its docs for the two last releases, so i guess not.

In that case, if you do not use CVS support in the IDE, then disable that plugin instead of Mercurial and monitor the problem on.
Comment 10 netacq_server 2011-05-26 15:35:00 UTC
(In reply to comment #9)
> > Is there any recent documentation on configuring and using the CVS plugin?
> Nothing has changed in the CVS support or its docs for the two last releases,
> so i guess not.
> 
> In that case, if you do not use CVS support in the IDE, then disable that
> plugin instead of Mercurial and monitor the problem on.

I'll disable CVS and continue. I haven't seen any problems yet today. Can you point me at a good documentation source for using/configuring CVS in NetBeans?
Comment 11 Ondrej Vrabec 2011-05-26 15:54:53 UTC
> Can you point me at a good documentation source for using/configuring CVS in NetBeans?
http://netbeans.org/kb/docs/ide/cvs.html
Just open a project from your CVS checkout, run Team -> CVS -> Update and fill in connection data.
Comment 12 Ondrej Vrabec 2011-05-30 09:06:30 UTC

*** This bug has been marked as a duplicate of bug 198455 ***