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 52828 - Copying directories copies CVS information as well
Summary: Copying directories copies CVS information as well
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-29 15:49 UTC by mclaassen
Modified: 2009-11-07 11:38 UTC (History)
2 users (show)

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 mclaassen 2004-12-29 15:49:37 UTC
When coping a directory, the CVS information is 
copied as well.

Here is what I did: 

     ProjectA/nbproject/subdir/subdir2
     ProjectB/nbproject/

- ProjectA has the project information in CVS
- I created a new netbeans project, ProjectB.
- I copied "subdir" from projectA into the 
nbproject directory of ProjectB.

Since ProjectB was not yet in version control, 
the nbproject directory was [local], but the new 
directory and files showed sticky tags from where 
they were copied from.  This was a bit 
bewildering until I figured out what was going on 
and deleted the CVS directories.
Comment 1 Martin Entlicher 2005-01-06 16:32:46 UTC
This is unsolvable with the current APIs. The filesystem have no idea
about copy operations, it gets just events for individual file
creation and I/O operation.

Filesystems would need a copy operation.
Comment 2 mclaassen 2005-01-06 19:58:24 UTC
This is definitely a defect.  

It may require "enhancing" the APIs to fix, but if you copy 
directories with netbeans you end up hosing yourself.  

If someone is not a bit savvy with how CVS works (and does not know 
to remove the CVS directories), they will be a state where they have 
files that cannot be used in conjunction with CVS at all.  The files 
will also display confusing information as their status and version.

I forgot this detail yesterday when I copied a directory and was 
pretty frustrated with the distraction.
Comment 3 rmatous 2005-02-15 12:23:00 UTC
Do you really need copy operation ? Isn't some flag like isCopyAllowed
sufficient ? 

Moreover there isn't supported copying of "folders" in filesystems API. 
This is now responsibility of DataFolder isn't it ? There actually
exists method isCopyAllowed in DataFolder. If there was method
isCopyAllowed in FileObject then this method could be used in
DataFolder. But other FS implementation than VCS won't probably care
about CVS folder. Moeroever we are going to get rid of VCSFS. In
addition there might be valid claim to copy all files including CVS
folder - probably neither from project nor files view but if we had
some pure file explorer.

I think that there is obvious that this case is absolutely the same
like visibility of files. I don't think that there is right solution
to change filesystem API because of this issue.

Reassigned back to vcscore.
  
Comment 4 Martin Entlicher 2005-02-15 13:55:55 UTC
Hmm, so we would have to create our own DataFolder, that would refuse
to copy itself.

In general VCS should assure that the versioning metadata will not be
copied (this also affects VSS (vssver.scc) and PVCS (vcs.cfg)).
Comment 5 Martin Entlicher 2005-02-15 15:19:25 UTC
I've concluded that implementing our own VCS DataFolder is the only
way to go (with the current APIs). It's not nice at all, but it's
impossible to solve this on FileSystem layer.
Starting to work on this...
Comment 6 Martin Entlicher 2005-02-15 16:28:03 UTC
Implemening a special VCS DataFolder in VCS modules is quite ugly. I
would have to copy the appropriate loader. And nobody would be able to
provide another DataFolder on versioned files.

Probably a better approach arose from the discussion with Yarda - take
the VisibilityQuery into account by the individual projects providers.
I.e. copy only files that the user actually see. That will skip CVS
folders and other "garbage" that is possibly there.

Therefore copy actions in Projects and Files view will act in
accordance with VisibilityQuery and copy action in Favorites (where
*all* files are visible) will copy everything (like now).

Tomas, can you please implement that in Java project? (and possibly
Files view...)
Comment 7 Tomas Zezula 2005-02-16 15:54:38 UTC
OK
Comment 8 Tomas Zezula 2005-03-04 14:58:45 UTC
Fixed in PackageView:
Checking in
src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java,v
 <--  PackageViewChildren.java
new revision: 1.54; previous revision: 1.53
done
Comment 9 Tomas Zezula 2005-03-24 09:17:05 UTC
Fixed for package view. For thysical view it requires bigger change, probably
new paste type (API) to allow to paste folders from the physical view into the
logical view.
Changing to promo-F
Comment 10 Tomas Zezula 2005-11-01 10:57:30 UTC
Partialy works (in the logical view works fine). 
Comment 11 Tomas Zezula 2007-10-24 15:37:12 UTC
Works in logical view.
Comment 12 David Strupl 2009-03-31 15:53:32 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 13 Quality Engineering 2009-11-02 10:58:22 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX