When working with Eclipse, should I add the workspace to the source control?

前端 未结 6 1824
刺人心
刺人心 2020-12-15 10:06

I am the only developer on this project.

6条回答
  •  暖寄归人
    2020-12-15 10:55

    I've played with the idea (with Subversion) of having a "MyProject_Eclipseproj" folder that only contains the the Eclipse project files and directories, with an svn:externals prop that pulls in all the "MyProject" files/directories.

    So, the layout would be:

    /repos/trunk/MyProject
    /repos/trunk/MyProject/build.xml
    /repos/trunk/MyProject/src
    /repos/trunk/MyProject/src/com
    /repos/trunk/MyProject/src/com/mypackage
    /repos/trunk/MyProject/src/com/mypackage/MyClass.java
    /repos/trunk/MyProject_Eclipse_34 <- external prop goes here
    /repos/trunk/MyProject_Eclipse_34/.settings/
    /repos/trunk/MyProject_Eclipse_34/.project
    /repos/trunk/MyProject_Eclipse_34/.classpath
    /repos/trunk/MyProject_Eclipse_35 <- external prop goes here
    /repos/trunk/MyProject_Eclipse_35/.settings/
    /repos/trunk/MyProject_Eclipse_35/.project
    /repos/trunk/MyProject_Eclipse_35/.classpath
    

    The MyProject folder would be pure code, no eclipse contaimination. The MyProject_Eclipse_Ver would contain Eclipse specific files, and pointers to pull in the code folders. You could also have specific folders for different Eclipse versions so each developer wouldn't be forced to upgrade if something changed in the .settings or .project file between versions.

提交回复
热议问题