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 180921

Summary: [69cat] After renaming additionally provide old file for deletion in commit dialogue
Product: versioncontrol Reporter: ulfzibis <ulfzibis>
Component: SubversionAssignee: Ondrej Vrabec <ovrabec>
Status: RESOLVED FIXED    
Severity: normal Keywords: PLAN
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: versioning view after a rename

Description ulfzibis 2010-02-18 11:32:47 UTC
On machine 1 I added plain file "Changes" and filled with some text.
After I committed single file to SVN repository.
On machine 2 I updated project from SVN repository.
I renamed file "Changes" to "Changes.txt" and then made some changes in the text.
After I committed single file to SVN repository.
On machine 1 I updated project from SVN repository.
After I had to files: "Changes" and "Changes.txt"
Comment 1 Ondrej Vrabec 2010-02-18 14:42:56 UTC
> After I committed single file to SVN repository.
And did you commit also the deletion (you mentioned you committed just a single file)? If you committed only the new file (Changes.txt) and not the deletion of Changes, it's logical you still had the old file (Changes).
Comment 2 ulfzibis 2010-02-18 15:17:48 UTC
Hm, after renaming to "Changes.txt", there was no old file to explicitly commit the deletion for, as it didn't exist anymore.

Before commit the svn label was [copied], so the deletion should be committed automatically on committing the new renamed version of the file.
Comment 3 Ondrej Vrabec 2010-02-19 00:52:57 UTC
ulf, you've been working with subversion for quite some time, so you must have already spotted that when you renamed a file and did Subversion->Show Changes, there are two changes in the view - one new file (Locally Copied) and one deleted file (Locally Removed). That's because subversion handles rename as two operations: copy and delete. So unless you commit the deletion, the old file won't be deleted from the repository. So after every rename, you should run Subversion -> Show changes and commit all changes.
I'm closing this as invalid
Comment 4 Ondrej Vrabec 2010-02-19 00:55:32 UTC
See the attached screenshot - the versioning view after renaming Main.java to Main2.java - there are two changes that need to be committed
Comment 5 Ondrej Vrabec 2010-02-19 00:55:37 UTC
Created attachment 94314 [details]
versioning view after a rename
Comment 6 ulfzibis 2010-02-19 03:08:10 UTC
> ulf, you've been working with subversion for quite some time, so you must have
> already spotted that when you renamed a file and did Subversion->Show Changes,
> there are two changes in the view

1. I never used Subversion->Show Changes to invoke the commit. I always used the context menu from project browser or editor tab.
Until this case I never recognized, that the deletion of the old file wasn't committed "automatically", because it was automatically listed in the commit dialogue. Maybe that was because I usually committed the whole folder or more.

2. My first guess was, there happened something different because (1) I used "Rename" instead of "Refactor->Rename" and/or (2) I only changed the file extension, not the main name.

So I change this to ENHANCEMENT:
Even on single file SVN commit:
After renaming additionally provide old file for deletion in commit dialogue

BTW: Why are there 3 SVN related output windows?
- Subversion
- Versioning Output
- Output tab -> https://....
I think, 2 would be enough.
Comment 7 Ondrej Vrabec 2011-06-10 09:17:27 UTC
fix: http://hg.netbeans.org/core-main/rev/6ddb9c061d9b
Comment 8 Quality Engineering 2011-06-11 15:13:38 UTC
Integrated into 'main-golden', will be available in build *201106110600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6ddb9c061d9b
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #180921 - [69cat] After renaming additionally provide old file for deletion in commit dialogue