I want to integrate SVN into Eclipse and came across the Subclipse project. Got this working and was able to load an already checked-out project from disk.
However, the problem is that this is an out-of-source project, meaning that the source files are not in a subdirectory of the directory containing the Eclipse project file. This results in a copy of the source files in the Debug/Release folders where the object files are stored.
The directory tree is then as follows:
Project-root
|-- trunk
| \-- src
| +-- .svn (svn version control metadata)
| \-- source files (*.cpp/*.hpp)
|-- trunk_build
\-- src
+-- Eclipse project files
\-- binary files
Where I only an "[Source directory]" directory that showed the real source files (the path ''Project-root/trunk/''), and a "src" directory without source files, the latter now shows the copies of the source files. I am able to use Subclipse functionality, but have two copies of my source files on disk: on in the out-of-source dir (available v开发者_如何学编程ia "[Source directory]" folder in Eclipse) and the other via a copy in the dir where the project is ("src" folder in Eclipse).
How can I integrate SVN in such an out-of-source build?
Basically, SubClipse copies the source files to the location of the Eclipse project (which, as seen in the code-tree above is in a different location).
Probably there's a reason why the source is at a different location so it may be best to add the true source location as an own (plain) project and use Subclipse on that. It mainly depends on what other files you have in your Eclipse project, if you want to version-control them too and how these other files and the source files should be arranged within the SVN server repository (e.g. also using different locations?). It might help if you provide more information in this regard.
I'm not sure I understand completely, but...
If you want to work with the project both inside and outside of Eclipse, when you can setup a linked folder for the src folder. Whether you want to save the Eclipse project in SVN as well can then be optional.
Alternatively, you can simply remove the src folder... It is really not needed unless you put sources there.
And thirdly, you can add the missing Eclipse booking files to the existing SVN project and then work on the project from inside Eclipse only..
精彩评论