Search code examples
eclipsesvnsubclipse

Is it possible to share a project without commiting?


I'd like to use "Share Project..." in Eclipse without actually commiting to SVN. Unfortunately, I am not able to find an option for doing this.

Instead, I want the relevant files only be added to SVN.

My goal is, that SVN should track all the files I move into the project using the package explorer.


Solution

  • Share Project needs to accomplish two things:

    1. It sets up some internal linkage in Eclipse that connects your project with the SVN Team Provider so that SVN menu actions are exposed and so that activities you perform are routed to the SVN provider to "handle".
    2. It has to establish your project as SVN "working copy" so that the SVN API that needs to be called on behalf of your actions can do what it needs to do.

    So the key here is that if you already have a SVN working copy then Share Project will recognize this and be able to do option 1 without needing to do anything else. But otherwise, it has to establish a working copy which requires it to do svn checkout from your repository. If it has to create the working copy then it makes the assumption it needs to create the project in the repos and then check that out on top of your local project. So the one commit it will do is a svn mkdir for a folder in the repos.

    If you do not want to do that, then do something to establish a working copy locally before you get started, such as checking out some existing location in your repository. As others have noted, you may want to be using branches and switch if you are refactoring something that already exists.