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 126062

Summary: Cannot rename a file which is not yet added to a repository
Product: versioncontrol Reporter: _ tboudreau <tboudreau>
Component: MercurialAssignee: issues@versioncontrol <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: proposed patch

Description _ tboudreau 2008-01-28 02:30:51 UTC
I have some project folders in a private mercurial repository that were moved there from nb.org's contrib project.  Mercurial knows nothing about them yet.  
I am trying to rename some of them.

When I try to rename one of these folders in the IDE I get:
ERROR Command failed:
Command: [/usr/local/bin/hg, rename, --repository, /Users/tim/space/hg_nb/nb_all/ext, --cwd, /Users/tim/space/hg_nb/nb_all/ext, 
dynactions_1.nodes, api.dynactions.nodes]
Output: [abort: no files to copy]
in the output window.

The module should detect if the files are known to mercurial and do a normal rename on them if not.
Comment 1 Padraig Obriain 2008-01-30 11:24:45 UTC
Can you clarify whether the problem is with files or folders?
Comment 2 _ tboudreau 2008-01-30 11:40:28 UTC
This was folders;  I filed a similar issue for renaming files.  May be the same thing.
Comment 3 Padraig Obriain 2008-01-30 11:50:29 UTC
I can reproduce it in Favourites or Files View but not in Projects View.

I do not see an issue open about renaming files. What is its number?
Comment 4 Padraig Obriain 2008-01-30 13:23:57 UTC
Created attachment 55763 [details]
proposed patch
Comment 5 Padraig Obriain 2008-01-30 13:26:35 UTC
searching for changes
changeset:   65117:5c95b41895b9
user:        padraigob@netbeans.org
date:        Wed Jan 30 13:21:35 2008 +0000
files:       mercurial/src/org/netbeans/modules/mercurial/MercurialInterceptor.java
mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java
description:
Issue 126062: Allow rename of directory to work even if it is does not contain managed files.


changeset:   65156:9b02794858a0
tag:         tip
parent:      65117:5c95b41895b9
parent:      65155:6c7b13ce6dd0
user:        padraigob@netbeans.org
date:        Wed Jan 30 13:25:24 2008 +0000
description:
Automated merge with http://hg.netbeans.org/main


Comment 6 _ tboudreau 2008-01-30 19:13:09 UTC
Hrm, I thought I filed it.

Just copy a Foo.java (managed) and paste it as Foo_1.java (unmanaged).  Refactor-rename it to Bar.java.  The content is refactored;  the filename is not 
changed.
Comment 7 Padraig Obriain 2008-01-31 11:26:59 UTC
I cannot reproduce this new problem from the description you have given. Please open a new bug for this.