Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [Subclipse-users] Copy/paste with folders

subclipse
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

Re: [Subclipse-users] Copy/paste with folders

Author jcompagner
Full name jcompagner
Date 2009-07-24 02:40:50 PDT
Message I used the Team->Copy i see this:

delete --force
F:/workspace/shiplib​s/configuration/org.​eclipse.equinox.simp​leconfigurator/org.e​clipse.update
    D
F:/workspace/shiplib​s/configuration/org.​eclipse.equinox.simp​leconfigurator/org.e​clipse.update
copy F:/workspace/shiplib​s/configuration/org.​eclipse.update
F:/workspace/shiplib​s/configuration/org.​eclipse.equinox.simp​leconfigurator/org.e​clipse.update
    A
F:/workspace/shiplib​s/configuration/org.​eclipse.equinox.simp​leconfigurator/org.e​clipse.update

If i then look into the copied folder, i notice that the files are not in
added mode.. But already have a icon of managed and nothing changed
If i then look into the svn properties of such a file i get this:

    Bad URL passed to RA layer
svn: URL '
https://subversion.s​ervoy.com/developmen​t/trunk/eclipse_buil​d/eclipse_ship_files​/configuration/org.e​clipse.equinox.simpl​econfigurator/org.ec​lipse.update/platfor​m.xml'
non-existent in revision 25548

Is there here something to blame?
I would say that it should also be in "added" mode or atleast show me that
in the icon.


I did try to search for a way to be able to copy just normally in eclipse
I changed FileModificationManager a bit, i added this:

            if (!addedFolders.isEmpty())
            {
                for(int i=0;i<addedFolder​s.size();i++)
                {
                    final IResource resource = (IResource)
addedFolders.get(i);
                    LocalResourceStatus resourceStatus =
SVNWorkspaceRoot.pee​kResourceStatusFor(r​esource.getRawLocati​on());
                    if (resourceStatus.isManaged())
                    {
                        boolean deleteSVNMetaFolders = false;
                        // quick check.
                        if (resourceStatus.getU​rlCopiedFrom() == null)
                        {
                            // if it was an ADDED folder and the copied from
url is still null then it was a copy and not a move. So delete all the svn
folders from that folder.
                            deleteSVNMetaFolders = true;
                        }
                        else
                        {
                            // is it maybe a copy of an to add folder?
                            SVNUrl parent =
resourceStatus.getUr​l().getParent();
                            LocalResourceStatus parentStatus =
SVNWorkspaceRoot.pee​kResourceStatusFor(r​esource.getParent().​getRawLocation());
                            if ( !parentStatus.getUrl​().equals(parent))
                            {
                                // the added folder
                                deleteSVNMetaFolders = true;
                            }
                        }
                        if (deleteSVNMetaFolders)
                        {
                            Job job = new Job("Deleting svn meta data of " +
resource.getName()) {
                                protected IStatus run(IProgressMonitor
monitor) {
                                    try {
                                        resource.accept(new
IResourceVisitor() {
                                            public boolean visit(IResource
resource) throws CoreException {
                                                if
(SVNWorkspaceRoot.is​SvnMetaResource(reso​urce))
                                                {
                                                    resource.delete(true,
null);
                                                    return false;
                                                }
                                                return true;
                                            }
                                        },
IResource.DEPTH_INFI​NITE,IContainer.INCL​UDE_TEAM_PRIVATE_MEM​BERS);

SVNWorkspaceRoot.get​SVNFolderFor(resourc​e.getParent()).refre​shStatus(true);
                                    } catch (CoreException e) {
                                        e.printStackTrace();
                                    }
                                    return Status.OK_STATUS;
                                }
                            };
                            job.setSystem(true);
                            job.setRule(resource);
                            job.schedule();
                        }
                    }
                }
            }


Then it works for me, ok its not an svn copy so that you keep that history,
but i dont really care for that at that time
I just want to have a copy of something, and in my eyes thats the same as
new. (if i really want a history copy then i can always use the Team->copy)

I dont know if that works for all occasions. is there a way that i get a
folder add where the folder doesnt have a copyFromUrl and the parent urls
also dont match
I guess something like a checkout of a dir into an already versioned dir
would fall in that category (but i cant seem to do that in the eclipse ui)

johan



On Fri, Jul 24, 2009 at 00:01, Mark Phippard <markphip at gmail dot com> wrote:

> Last time I checked (long time ago) the xxx\cvs was copied. The
> Eclipse bug to add a copy hook is still not implemented.
>
> If you make any headway, use this issue:
>
> http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=784
>
>
>
> On Thu, Jul 23, 2009 at 5:43 PM, jcompagner<jcompa​gner at gmail dot com> wrote:
> > i am diving in to this a bit
> >
> > The problem is that if i copy the folder "xxx" that then "xxx\.svn" is
> also
> > copied right?
> >
> > But why does that happen? How does CVS not do that? if i copy "xxx" then
> > "xxx\cvs" isnt copied...
> >
> > johan
> >
> >
> > On Thu, Jul 23, 2009 at 15:41, Mark Phippard <markphip at gmail dot com> wrote:
> >>
> >> This is an Eclipse issue that has existed forever. Unlike when you
> >> move something, when you copy Eclipse does not do anything to allow a
> >> Team provider to be involved. There is no "copyHook" for team
> >> providers as there is with move and delete. People have tried to use
> >> listeners to detect when this happens and fix it, but it is not
> >> possible to make it work.
> >>
> >> We added a Team > Copy/Export option as something of a workaround. So
> >> that you can do a copy that we do know about and can do it right.
> >>
> >>
> >> On Wed, Jul 22, 2009 at 7:57 PM, kukgini<kukgini@g​mail.com> wrote:
> >> > Bug or feature? --
> >> >
> >> > Copy/paste of a folder under SVN controls leads to a duplication not
> >> > only of the folder contents, but also of the ".svn" subfolders inside
> >> > it. Therefore, the copy is also automatically markes as being under
> >> > version control.
> >> >
> >> > My experience is that this result is usually unwanted and/or annoying.
> >> >
> >> > (Furthermore, it appears that the copied resources point to the same
> SVN
> >> > resources, i.e. deleting the files in the new copy might probably mark
> >> > them as deleted in the other parent folder, too.)
> >> >
> >>
> >>
> >>
> >> --
> >> Thanks
> >>
> >> Mark Phippard
> >> http://markphip.blogspot.com/
> >>
> >> --------------------​--------------------​--------------
> >>
> >>
> http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1047​&dsMessageId=237​4822
> >>
> >> To unsubscribe from this discussion, e-mail:
> >> [users-unsubscribe@s​ubclipse.tigris.org]​.
> >
> >
>
>
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>
> --------------------​--------------------​--------------
>
> http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1047​&dsMessageId=237​5008
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@su​bclipse.tigris.org].​
>
Attachments

« Previous message in topic | 6 of 7 | Next message in topic »

Messages

Show all messages in topic

[Subclipse-users] Copy/paste with folders kukgini kukgini 2009-07-22 16:57:17 PDT
     Re: [Subclipse-users] Copy/paste with folders jcompagner jcompagner 2009-07-23 00:21:48 PDT
     Re: [Subclipse-users] Copy/paste with folders markphip Mark Phippard 2009-07-23 06:41:40 PDT
         Re: [Subclipse-users] Copy/paste with folders jcompagner jcompagner 2009-07-23 14:43:36 PDT
             Re: [Subclipse-users] Copy/paste with folders markphip Mark Phippard 2009-07-23 15:01:45 PDT
                 Re: [Subclipse-users] Copy/paste with folders jcompagner jcompagner 2009-07-24 02:40:50 PDT
                     Re: [Subclipse-users] Copy/paste with folders jcompagner jcompagner 2009-07-29 11:10:29 PDT
Messages per page: