We have a huge, old, and ugly SVN repo, with a main folder on the top.
This folder contains the branches folder (with the core of our code), as well as several other folders F1, F2, F3... that contain some dependencies.
I would like to import in a single Eclipse project, by using subclipse, a particular branch as well as only folders F1 and F3. But subclipse doesn't seem to allow a checkout in an existing Eclipse project (but perhaps is my intent totally stupid?). And what if I want to import folders that are outside main?
An Eclipse project that is linked with Subclipse has to be a single SVN working copy rooted at the top folder of the Eclipse project. So any legitimate way that exists to construct a valid working copy would work. This could be checking out the top level folder using the Depth = Immediates option and then using the update set-depth option to expand specific folders. You could use Switch to swap out some folders with those from a different branch. You can use svn:externals to pull in folders from other locations etc.
It is hard to say which, if any, of these options might work for you.
Related
I just added repository A to my Git perspective in Eclipse (which also instanced a local Git repository under some path) and can now see the working tree. Now how do I work on the files in the package explorer?
From what I've seen I have to use "import projects" - what does this do? My Eclipse workspace seems to be empty, while made changes will all display in the git repository.
Also, how do I work with multiple repositories and how do I switch between them? When I try to "import projects" from repository B I get the message that Some or all projects cannot be imported because they already exist in the workspace
The issue here is that Eclipse maintains its own file system representation that includes projects. This was required historically to support incremental compilers, even if the file system is not capable of sending notifications.
The Import projects option you have seen relates to importing projects from a git repository into the Eclipse file system; adding the repository to Eclipse allows Eclipse to know about the repository, and execute repository operations (e.g. fetch, commit, push).
About why doesn't the project import work, the Eclipse file system contains a set of top-level projects (each can be either in the workspace folder or somewhere on the disk, e.g. in a git repository); however, it is not possible to have two projects with the same name in the same workspace.
If you want to open the "same" project from two repositories (e.g. two development branches), you have to rename them not to have a common name. This name is stored in a .project file in the project root (or if none exists, it will be derived); you can use a refactor operation to change the project names. After that, you can import both projects into your Eclipse workspace.
I just added repository A to my Git perspective in Eclipse (which also instanced a local Git repository under some path) and can now see the working tree. Now how do I work on the files in the package explorer?
From what I've seen I have to use "import projects" - what does this do? My Eclipse workspace seems to be empty, while made changes will all display in the git repository.
Also, how do I work with multiple repositories and how do I switch between them? When I try to "import projects" from repository B I get the message that Some or all projects cannot be imported because they already exist in the workspace
The issue here is that Eclipse maintains its own file system representation that includes projects. This was required historically to support incremental compilers, even if the file system is not capable of sending notifications.
The Import projects option you have seen relates to importing projects from a git repository into the Eclipse file system; adding the repository to Eclipse allows Eclipse to know about the repository, and execute repository operations (e.g. fetch, commit, push).
About why doesn't the project import work, the Eclipse file system contains a set of top-level projects (each can be either in the workspace folder or somewhere on the disk, e.g. in a git repository); however, it is not possible to have two projects with the same name in the same workspace.
If you want to open the "same" project from two repositories (e.g. two development branches), you have to rename them not to have a common name. This name is stored in a .project file in the project root (or if none exists, it will be derived); you can use a refactor operation to change the project names. After that, you can import both projects into your Eclipse workspace.
I have selected several projects in my eclipse CVS repository and I have marked them with a new version/tag.
I would now like to display the content of this new version instead of analysing projects by projects the history of each.
Is there a solution ?
I've googled and no result for my need (may be wrong key words ?)
Thanks you.
Patrice
I'm assuming that you have 1 CVS repository which contains N Eclipse projects.
Create a simple Eclipse project at the root of your CVS repository. That will allow you to import everything as a single project. From this project, you can see the whole history over everything.
When you want to work on a child project, import it from the local disk instead of from the CVS server. Don't forget to disable "Copy files" when you import. Eclipse will notice that these two projects are related (i.e. one is inside of the path of another). Doing CVS operations will now work on the parent project.
That said, you should really consider to move to a DVCS :-)
In my project I have a directory structure like this :
project
--common
--subproject
--common (junction, not a copy)
The subproject needs some files from common. Therefore I created a 'junction' (in XP using the sysinternals command) to be able to see and make changes in common from within the subproject.
This works like a charm, any changes to both commons are immediately on both common since in fact it points to the same folder.
Then I made a separate project in Eclipse for the subproject folder and its own svn repository.
But when I want to commit the subproject, it wants to commit the 'common' folder as if it were a real folder, but in fact this folder needs to be committed only to its parents repository!
Is there a way of telling svn to make commits to a different repository than its own?
svn:externals is not a good solution since this creates duplicate sources, and makes it even harder to maintain, because it's not automatically kept in sync.
eclipse's file system abstraction features linked folders.
Have you tried using those rather than a junction at the filesystem level? (I don't know how the subversion plugin treats those, but perhaps you are in luck)
I'm working on a new project with a full ANT build. I use eclipse to write my code, and I would like others to be able to check out the project to have a full working eclipse workspace. I do not want to have specific user settings committed though.
What files and directories should I have in source control?
(I'd rather not just go grab a plugin - I prefer more control over what goes in the repository)
We just put .project and .classpath in our repository, and that's sufficient to make it work "out of the box" for new developers. I'd like to have other stuff (run configurations come to mind), but haven't figured out how.
We use Subversion, so I put these files in a separate directory and defined svn:externals on that directory to point to the actual code, leaving it unpolluted by IDE-specific files.
Per request in the comments, here are the external that we use. Nothing complicated going on here:
Properties on 'svn://dev/trunk/IDEs/eclipse/runtime':
svn:ignore
bin
.fbprefs
cobertura.ser
.settings
svn:externals
lib/bin svn://dev/trunk/lib/bin
runtime svn://dev/trunk/runtime