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 161437 - Ignore folder in SVN operations if its already on SVN
Summary: Ignore folder in SVN operations if its already on SVN
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-30 09:12 UTC by akiliyevich
Modified: 2010-05-26 07:51 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Icons for SVN actions (10.50 KB, application/zip)
2010-05-26 07:51 UTC, akiliyevich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akiliyevich 2009-03-30 09:12:21 UTC
Is it possible to ignore a folder during SVN operations if the folder is already under SVN?
I implemented SharabilityQueryImplementation and VisibilityQueryImplementation but the folder is still displayed in
'Commit' and 'Update' dialogs, though it is not visible in 'Files' tab and is not processed during 'Search in files'.
Comment 1 akiliyevich 2009-03-30 15:57:45 UTC
I have just found the most simple solution.

Is it possible to make some changes in function 'org.netbeans.modules.versioning.spi.VCSContext.forNodes(Node[] nodes)' ?
Write 'node.getLookup().lookupAll(File.class)' instead of 'node.getLookup().lookup(File.class)' and collect all files.

I understand that it is possible to use FileObjects, but its not worked, because I want to override behavior of our
'Project' node, and, IMHO, this is the most simple way. 

I want to enumerate list of files(!) and folders of our project to except some sub-folders.

I understand that it is possible to use 'org.netbeans.api.project.Sources', but it doesn't support files, only folders
(IllegalStateException on files).
Comment 2 Tomas Stupka 2009-03-31 11:01:52 UTC
> Is it possible to ignore a folder during SVN operations if the folder is already under SVN?
> I implemented SharabilityQueryImplementation and VisibilityQueryImplementation but the folder is still displayed in
the SharabilityQueryImplementation is called only as long a file isn't shared yet so i'm afraid it isn't.   

> I have just found the most simple solution.
> Is it possible to make some changes in function 'org.netbeans.modules.versioning.spi.VCSContext.forNodes(Node[] 
> nodes)' ? Write 'node.getLookup().lookupAll(File.class)' instead of 'node.getLookup().lookup(File.class)' and collect
> all files.
i would be careful at this place as that might have an impact on many other places in our vcs modules.
what exactly are you missing when its done via node.getLookup().lookup(File.class)? aren't the context roots enough to
list your project files later. 
Comment 3 akiliyevich 2009-04-01 06:00:21 UTC
> I would be careful at this place as that might have an impact on many other places in our vcs modules.

Yes, it is quite possible.

We are developing a designer based on NetBeans Platform.
Files of our project are stored in several directories that can include subdirectories named 'Kernel'.
In spite of the fact that these subdirectories is under version control we do not want them to be processed during any
VCS operations in our designer. 

I managed to hide these subdirectories using VisibilityQueryImplementation. They disappeared from 'Files' tab and were
ignored by search engine, but VCS operations tried to process them.

Then I created SharabilityQueryImplementation and did not succeed. I suppose it happened because of TODO: #60516 in
org.netbeans.modules.versioning.spi.VCSContext. 
I wonder if it is possible to enable 'deep scan' for 'SharabilityQuery.MIXED' directories. I think it might help to
solve my problem.

After that I defined FileObject list for every Node to exclude ‘Kernel’ subdirectories.
It works everywhere but not for Project Node because Project has higher priority than FileObject in VCSContext.forNodes().

In addition, I tried to use ‘org.netbeans.api.project.Sources’ class but it supports only directories and does not allow
registering usual files (IllegalStateException is thrown).
Comment 4 akiliyevich 2010-05-26 07:51:06 UTC
Created attachment 99475 [details]
Icons for SVN actions
Comment 5 akiliyevich 2010-05-26 07:51:51 UTC
Out project contains more than 1500 nonrecursive files, which are in SVN:IGNORE.
Netbeans SVN plugin during cache refreshing, for each file, that is not under SVN asks whether it is in SVN:IGNORE, it takes a very long time, sometimes up to 10 minutes :-(

I had to replace all SVN actions by delegates, and calculate context by my self:

org.netbeans.modules.subversion.util.Context = new Context(files, files, exclusions);

As a result, the brakes are gone, despite the fact that the exclusions contain 1500 files (squared relationship in FileStatusCache.listFiles in filter exclusions).

At the same time all the action placed on the toolbar.
Previously, this was difficult because of the lack of icons in your actions.

Icons are attached.