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 219750 - refactor rename package
Summary: refactor rename package
Status: RESOLVED DUPLICATE of bug 219534
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Localhistory (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 219928 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-09 12:06 UTC by vdtoorn
Modified: 2012-10-12 09:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Git error message (15.78 KB, image/png)
2012-10-09 15:01 UTC, vdtoorn
Details
messages.log (411.76 KB, application/octet-stream)
2012-10-10 10:30 UTC, vdtoorn
Details
older messages log (394.86 KB, application/octet-stream)
2012-10-10 10:31 UTC, vdtoorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vdtoorn 2012-10-09 12:06:58 UTC
I tried to rename a package, which contained a sub-package. This failed, leaving me with half of the source files copied and the other half with refactored package names, but in the wrong location. I had to manually move the java files and remove the old package folders to get things back to normal.

I use Git and Maven.
Comment 1 vdtoorn 2012-10-09 15:01:19 UTC
Created attachment 125640 [details]
Git error message

This is a Git bug I receive with some refactorings. Possibly this has something to do with it.
Comment 2 vdtoorn 2012-10-09 15:02:49 UTC
I noticed that when the refactor is initiated as a simple rename operation, it will work. (i.e. slow double clicking on the package name and typing in a new name.)
Comment 3 Ondrej Vrabec 2012-10-10 08:16:28 UTC
attach the messages.log with the error please (http://wiki.netbeans.org/FaqLogMessagesFile)
Comment 4 vdtoorn 2012-10-10 10:30:29 UTC
Created attachment 125670 [details]
messages.log
Comment 5 vdtoorn 2012-10-10 10:31:56 UTC
Created attachment 125671 [details]
older messages log

Some older messages, probably the newer ones contain all error messages for the bug report.
Comment 6 Ondrej Vrabec 2012-10-10 10:45:32 UTC
Ralph, are you sure the refactoring works ok or do these log messages indicate a problem?
> INFO [org.netbeans.modules.refactoring.spi.impl.ParametersPanel]: org.netbeans.modules.refactoring.api.RefactoringSession@3f4b08e6 called start multiple times
> INFO [org.netbeans.modules.refactoring.spi.impl.ParametersPanel]: org.netbeans.modules.refactoring.api.RefactoringSession@6e3ecc3a called start multiple times
What git does is simple java.io.File.renameTo, we cannot do more. Failed renameTo could mean that the rename is performed twice or the target exists but i assume refactoring runs just once.
This is another duplicate of a failed rename.
Comment 7 Ralph Ruijs 2012-10-10 12:46:44 UTC
(In reply to comment #6)
> Ralph, are you sure the refactoring works ok or do these log messages indicate
> a problem?
> > INFO [org.netbeans.modules.refactoring.spi.impl.ParametersPanel]: org.netbeans.modules.refactoring.api.RefactoringSession@3f4b08e6 called start multiple times
> > INFO [org.netbeans.modules.refactoring.spi.impl.ParametersPanel]: org.netbeans.modules.refactoring.api.RefactoringSession@6e3ecc3a called start multiple times

These are just informative about the progress support.

> What git does is simple java.io.File.renameTo, we cannot do more. Failed
> renameTo could mean that the rename is performed twice or the target exists but
> i assume refactoring runs just once.
> This is another duplicate of a failed rename.

From the messages.log it looks to be a problem in LocalHistory.
Comment 8 Ralph Ruijs 2012-10-12 09:20:52 UTC
*** Bug 219928 has been marked as a duplicate of this bug. ***
Comment 9 Ondrej Vrabec 2012-10-12 09:33:00 UTC

*** This bug has been marked as a duplicate of bug 219534 ***