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 15504 - Assure a backward compatibility with vcscvs filsystems
Summary: Assure a backward compatibility with vcscvs filsystems
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-14 10:24 UTC by Martin Entlicher
Modified: 2001-11-01 10:36 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2001-09-14 10:24:10 UTC
Since vcscvs module was removed from the standard distribution a backward
compatibility with it's filesystems should be made.

There are (at least) two possible approaches, both with some drawbacks:

1. Create a dummy filesystem in vcsgeneric module, which will deserialize the
old CvsFileSystem from vcscvs and return the CommandLineVcsFileSystem based on
the appropriate CVS profile. The CvsFileSystem in vcscvs module for 3.3 will
change it's class name and serialValueUID to prevent from conversion to
CommandLineVcsFileSystem, otherwise the future work on vcscvs would not be
possible.

Drawbacks: if anyone removes vcsgeneric module and retrieves new vcscvs module
from autoupdate, it will NOT deserialize CVS filesystems from 3.2. Also future
work with vcscvs module (in 3.3) will probably never convert to vcsgeneric in
the future releases.

2. Create a separate module, that will depend on vcsgeneric module and will
contain CvsFileSystem with the SAME class path as is in vcscvs module. This
filesystem will assure the conversion to CommandLineVcsFileSystem with the
appropriate CVS profile. However we will have to assure, that this dummy module
will be present in the system ONLY when vcscvs module will NOT be present.

Drawbacks: Introduction of a new module, not sure whether we're able to disable
it when vcscvs module is enabled.
Comment 1 Jesse Glick 2001-09-14 14:29:04 UTC
I would probably recommend #2 though neither is ideal. (One day all
settings will be in XML and there will be alternatives...) To disable
it when vcscvs is enabled, try this: create an empty file in the
vcscvs layer named e.g.

Modules/org-netbeans-modules-vcscvs-dummy.xml_hidden

where org.netbeans.modules.vcscvs.dummy is the code name base of this
theoretical module. I think it will work, though I have never tried
anything like this and there could be some timing concerns with the
classloaders.
Comment 2 Martin Entlicher 2001-09-14 15:44:47 UTC
Jesse, thanks for your hints, however it seems, that
Modules/org-netbeans-modules-vcscvs-dummy.xml_hidden does not work (or
I must do it wrong). However, perhaps another "hack" can be done: in
ModuleInstall.installed() of vcscvs module, read the
Modules/org-netbeans-modules-vcscvs-dummy.xml and change element
<param name="enabled">true</param> to
<param name="enabled">false</param>.
This should disable the dummy module.
In ModuleInstall.uninstalled() of vcscvs module I can revert it back
(in case, that vcsgeneric module will be enabled).
I'll try it and let you know whether it works or not. Thanks.
Comment 3 Jesse Glick 2001-09-16 18:17:00 UTC
True, a layer cannot override what is in the system/ dir, so using
ModuleInstall may be the only way. Look at Modules API, it talks about
what to do.

Careful with classloaders--I would not put your ModuleInstall in the
same package as the filesystem, as while the dummy module is
installed, attempts to load classes from that package might go
straight to it and fail to find your installer.
Comment 4 Martin Entlicher 2001-09-17 16:56:27 UTC
The compatibility module was contributed. It seems to work right for
3.2 projects. Into vcscvs module a ModuleInstall class was added, that
install/uninstall the compatibility module. For vcscvs's 3.3 projects
it may not work right due to .settings file created for CvsFileSystem
and associating it with vcscvs module.

Thanks to Jesse for the implementation hints.
Comment 5 Martin Entlicher 2001-09-18 14:08:33 UTC
A submodule under vcscvs created (vcscvs/compat) instead of an extra
module. The inclusion of this module into the standard distribution is
in progress...
Comment 6 Martin Entlicher 2001-10-03 16:24:26 UTC
Fixed, the compatibility module was created.

It would be probably good to NOT have the vcscvs module abailable via
autoupdate, since the users should be forced to change to VCS Generic
module. The vcscvs module will not be maintained any more, and the
transfer of vcscvs's filesystems from 3.3 to vcsgeneric's filesystems
in 3.3 or 4.0 would probably not be possible due to the association of
vcscvs's FS settings with vcscvs module.
Comment 7 Jiri Kovalsky 2001-11-01 10:36:26 UTC
I also vote for removing vcscvs module from auto update and then from 
IssueZilla too. Anyway convertor works fine. Verified in development 
build of NetBeans 3.3 #200111010100.