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 54150 - Provide support for VCS lite
Summary: Provide support for VCS lite
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
Depends on: 59737 65717 55639 57016 57776 57900 58149 58489 58530 58738
Blocks:
  Show dependency tree
 
Reported: 2005-01-28 11:04 UTC by Maros Sandor
Modified: 2008-12-22 10:53 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed implementation (22.21 KB, patch)
2005-02-02 17:50 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maros Sandor 2005-01-28 11:04:31 UTC
1. Provide support for annotation of Node labels
in Files and Project views.

2. Provide support for contributing actions to a
Node's popup menu in Files and Project views.

These requirements are driven by these use cases:

http://jupiter.czech.sun.com/wiki/view/Lct/NodeActionsSupport
http://jupiter.czech.sun.com/wiki/view/Lct/NodeAnnotationsSupport
Comment 1 Maros Sandor 2005-02-01 13:45:17 UTC
Concerning annotation updates:

addFileStatusListener(FileStatusListener) should be a part of
org.openide.filesystems.FileSystem.FileStatus (instead of the
FileSystem itself)
Comment 2 Jaroslav Tulach 2005-02-02 17:50:33 UTC
Created attachment 20160 [details]
Proposed implementation
Comment 3 Jaroslav Tulach 2005-02-03 07:32:03 UTC
Marosi, please evaluate the attached solution and if ok, reassign to
Radek to polish and integrate it.
Comment 4 Maros Sandor 2005-02-04 10:26:11 UTC
Patch seems to work well, emulates current VCS behavior. I have 2
questions: 

1. How well will new and old VCS supports coexist?
2. I suppose that other logical views (ie. not based on Dataobjects),
if they'd work with the filesystem as DOs do, will be annotable as
well, right?
Comment 5 Jaroslav Tulach 2005-02-04 18:15:44 UTC
I expected that the support for current VCS would be removed before
this patch is integrated. It need not be, but it would be simpler if
it was. If not, everyone is queried. The provider and the underlaying
filesystems.

If logical views use DataNode, they will get annotated behaviour. If
not, they can always use 

fo.getFileSystem().getStatus().annotateName(fo.getName(),
Collections.singleton(fo));

to talk to VCS support without using data systems at all.
Comment 6 Maros Sandor 2005-02-05 01:19:37 UTC
We will not be able to replace current VCS support that fast because
of number of versioning systems currently supported. We will deliver
new support progressively one by one (CVS first). That's why we ask
for compatibility, i.e. *presence* of one module won't break the
other. If one mounts/manages the same directory in both systems at the
same time the behavior can be undefined.
Comment 7 Jaroslav Tulach 2005-02-06 13:38:39 UTC
I see. In such case the current patch is fine as it keeps
functionality of both. You can try it if you want.

I am returning the issue to Radek to continue with integration.
Comment 8 _ pkuzel 2005-02-17 11:29:10 UTC
Complete patch is applied to openide/masterfs in vcslite branch.
Comment 9 Maros Sandor 2005-03-10 08:53:43 UTC
Can we have it intergrated into 4.1 codebase? The reason is that we'd like to
release a CVSlite beta version on autoupdate which works with 4.1. In current
state we would also have to bundle mfs with it.
Comment 10 rmatous 2005-03-10 10:31:59 UTC
I prefer you to bundle mfs with it for 4.1.
Comment 11 _ pkuzel 2005-04-19 13:48:01 UTC
There are initial patches under javacvs/cvsmodule/patches covering
 - Editor tab coloring (issue #57900)
 - Actions on J2SE project node (issue #57776)
 - Progress API integration
Comment 12 rmatous 2005-04-26 13:38:08 UTC
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java,v
 new revision: 1.38.2.1; previous revision: 1.38

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileSystem.java,v
 new revision: 1.18.2.3; previous revision: 1.18.2.2

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/providers/Attic/AnnotationProvider.java,v
 new revision: 1.1.2.2; previous revision: 1.1.2.1

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/providers/Attic/InterceptionListener.java,v

 new revision: 1.1.2.1; previous revision: 1.1
Comment 13 Maros Sandor 2005-04-27 14:53:33 UTC
I looket at InterceptionListener. 
1) I am not quite sure how to use it as an interception facility. Can I delete
the FileObject myself in beforeDelete()? If so, how do I indicate that I failed?
2) If I do not wish to provide annotations, can I still be an interceptor? I ask
because getInterceptionListener() is in AnnotationProvider which surprised me.
Comment 14 _ pkuzel 2005-04-27 15:31:01 UTC
Recent simple (possibly wrong) idea how to address folder delete problem in CVS.

Store deleted folder names into their parent folder CVS/folders.removed which
can be achieved using existing FileChangeListener.fileDeleted(). It means that
CVS support would not cache any metadata. Instead it would recreate them on fly
(here directly from repository instead of from intercepted&cached metadata) by
contacting repository if CVS/folders.removed detected. DRAWBACK: it can not
detect conflicts (file to be removed was in meantime changed in repository).
Comment 15 Maros Sandor 2005-04-27 15:50:09 UTC
Interesting idea. This approach would also delete all files that were originally
NOT in user workdir and were added by some other user. In other words, we would
not be able to detect, what files were actually deleted. It would also be a lot
slower.
Comment 16 rmatous 2005-04-27 15:59:03 UTC
org.netbeans.modules.masterfs.providers is just a friend contract (no public
API). Moreover all changes are in branch. So, we can easily play with it. Maybe
you won't need any interception att all (seems to me according to P.Kuzel's
comment).  I provided something according our last discussion and wait for your
feedback. 

Even if its not public API  we should  polish this API including javadoc, naming
of its classes and methods before merging into trunk. 

If you won't need for example those two methods: deleteSucces, deleteFailure
because FileChangeListener.fileDeleted is enough for you because you listen on
FileObject anyway - then I delete them or you can easily do it yourself.    

Can I delete the FileObject myself in beforeDelete()? - NO. 
If I do not wish to provide annotations, can I still be an interceptor? - if its
your use case then I'll do it as you want. I don't care about it - its up to
you. As I said - no public API. For me is important - ensure backward compatible
behaviour & performance.


Comment 17 _ pkuzel 2005-05-02 15:27:53 UTC
Missing project API blocks integrating checkout wizard with projects (issue #58489).
Comment 18 rmatous 2005-05-24 16:22:17 UTC
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java,v
 new revision: 1.44; previous revision: 1.43

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileSystem.java,v
 new revision: 1.19; previous revision: 1.18

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/providers/AnnotationProvider.java,v
 new revision: 1.2; previous revision: 1.1

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/providers/InterceptionListener.java,v
 new revision: 1.2; previous revision: 1.1

Merged into trunk as it was - should be polished that's why I let this issue
still  open.
Comment 19 Antonin Nebuzelsky 2008-04-15 17:17:06 UTC
Reassigning to new module owner jskrivanek.
Comment 20 Jiri Skrivanek 2008-10-13 15:52:20 UTC
Closing. Anyone welcome to file a separate issue with additional request for enhancement.