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 172182 - No FS event after Subversion > Update
Summary: No FS event after Subversion > Update
Status: RESOLVED WONTFIX
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on: 170862
Blocks: 172254
  Show dependency tree
 
Reported: 2009-09-14 14:39 UTC by Tomas Mysik
Modified: 2011-08-30 09:42 UTC (History)
3 users (show)

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 Tomas Mysik 2009-09-14 14:39:52 UTC
Steps to reproduce:
- start NB with one (PHP) project which uses subversion for versioning
- switch to console, do a clean clone of the same repository as for project opened in the previous step
- change a file in this fresh clone and commit
- switch to NB and do svn update via context menu
-> result: no FS event is fired but should be for the file changed a while ago in console

This problem could be in other versioning modules like CVS, Mercurial etc. as well, not tested.

Product Version: NetBeans IDE Dev (Build 090914)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
System: Linux version 2.6.28-15-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Tomas Stupka 2009-09-16 16:05:37 UTC
we should ensure that after every vcs cmd changing files there will be a fs.refresh
however, all fileobject relevant to a php project should be known by filesystem - 170862 would be a way
Comment 2 Jaroslav Tulach 2009-10-07 15:11:05 UTC
The fix for post 6.8 should be:

FileObject root = findRootOfVCSOperation();
FileChangeListener tmpListener = new MyListener();
root.addRecursiveListener(tmpListener);
// do the external command
FileUtil.refreshFor(FileUtil.toFile(root));
root.removeRecursiveListener(tmpListener);
Comment 3 Ondrej Vrabec 2011-08-30 09:18:38 UTC
PHP attaches its own recursive listener, right? No need to add/remove it before/after every svn action.
Comment 4 Tomas Mysik 2011-08-30 09:27:17 UTC
So you do

> FileUtil.refreshFor(FileUtil.toFile(root));

right?
Comment 5 Ondrej Vrabec 2011-08-30 09:38:34 UTC
> So you do
> > FileUtil.refreshFor(FileUtil.toFile(root));
> right?
As far as i know, we do. We either call it directly here: http://hg.netbeans.org/core-main/file/a19eada68d05/versioning.util/src/org/netbeans/modules/versioning/util/IndexingBridge.java#l160 or through Parsing API if available (the second if branch in IndexingBridge).
And since the native listener was introduced, that shouldn't be even necessary, i think.
Comment 6 Tomas Mysik 2011-08-30 09:42:00 UTC
OK, thanks, I will have a look at it.