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 142698 - [65cat] [tools] Files deleted using component tools like Rails Plugin Manager cannot be deleted from SVN repository
Summary: [65cat] [tools] Files deleted using component tools like Rails Plugin Manager...
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Rails (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-03 00:00 UTC by esmithbss
Modified: 2008-09-10 17:23 UTC (History)
0 users

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 esmithbss 2008-08-03 00:00:49 UTC
[ BUILD # : 200808010201 ]
[ JDK VERSION : 1.6.0_07 ]

When files are deleted as a result of "Rails Plugin Manager
uninstall", the files show up as "Remotely New" in the "Show Changes"
subversion window instead of "Locally Deleted.
Comment 1 Maros Sandor 2008-08-04 08:55:56 UTC
Are those files still in the svn repository? If you ran 'svn update' would they be resurrected?
Comment 2 esmithbss 2008-08-05 03:48:42 UTC
Yes, the files remain in the subversion repository and if you perform an update, they are indeed restored to the project.
Comment 3 Tomas Stupka 2008-08-18 11:20:01 UTC
i'm not very familiar with rails & co.

could you please describe how to reproduce?

thanks
Comment 4 esmithbss 2008-08-18 14:57:57 UTC
Certainly,

1) Create a new Ruby on Rails application

2) Import the application into a subversion repository.

3) Using the Rails Plugin Manager, add a plugin or two to the application.

4) Add all the new files to the repository and commit all changes.

5) Using the Rails Plugin Manager, remove one of the plugins you added in step 3.

6) Check the Subversion Window and you will see that the files are locally removed, but that you cannot identify that
you want to delete them from repository.
Comment 5 Tomas Stupka 2008-08-20 08:21:01 UTC
this is caused by the plugin manager which removes the whole plugin folder including svn metadata. The plugin files
don't exist on the disk anymore, svn lost track about them, but they are still present in the repository - thus remotely
new. 

reassigning for further evaluation

Is there any chance:
a) that the uninstall script called by the plugin manager would remove the files in a svn manner (svn remove instead of rm) 
b) or that the plugin folder would be removed via the netbeans filesystem before/instead of calling an external script?
That way the vcs modules would take over the delete and carry out the appropriate commands 

any other ideas?

thanks
Comment 6 Erno Mononen 2008-08-20 12:20:08 UTC
I think we can do b), a) is more tricky since we'd need to modify the external script (although dynamically redefining 
certain methods could be an option). 
Comment 7 Quality Engineering 2008-08-20 17:29:38 UTC
Integrated into 'main-golden', available in build *200808201401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/f66afd6bc28b
User: Tomas Stupka <tstupka@netbeans.org>
Log: #142698 - [65cat] [tools] Files deleted using component tools like Rails Plugin Manager cannot be deleted from SVN repository
partial fix - try to invoke a svn remove for externaly deleted files
Comment 8 Erno Mononen 2008-09-09 09:46:30 UTC
Looking at this more closely, just removing a plugin via using the netbeans file system doesn't work, the plugin script 
also invokes an uninstall hook. I need to redefine the Plugin#uninstall method and load that before running the plugin 
script. 
Comment 9 Erno Mononen 2008-09-10 07:29:38 UTC
Fixed, e3393d630853.
Comment 10 Quality Engineering 2008-09-10 17:23:20 UTC
Integrated into 'main-golden', will be available in build *200809101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e3393d630853
User: Erno Mononen <emononen@netbeans.org>
Log: #142698: [65cat] [tools] Files deleted using component tools like Rails Plugin Manager cannot be deleted from SVN repository