开发者

eclipse + multiple checkouts of version-controlled projects

We're using eclipse and svn. We keep the .proje开发者_Go百科ct file in version control.

The problem is, if you have more than one checked-out project (e.g. a trunk checkout and a feature branch) and would like them both to be available in Eclipse, you lose, because the .project files are identical and therefore can't both be imported into Eclipse.

What's the right way to deal with this? (I'm mostly having to deal with this in TI's Code Composer v4 which uses an older version of eclipse, but I'm also going to need to do this in the regular Eclipse)


I recommend setting up separate workspaces for working on multiple branches. It is possible to do it all in one workspaces, but it gets awkward in a hurry. Depending on which tooling you use, you may need to close projects from branches you are currently not working on to keep them from interfering.


Since Eclipse3.3, you find bugs like:

  • Bug 218973
    [Import/Export] Import existing projects wizard: can't import two version of same project
  • Bug 110135
    [Import/Export] Import existing projects wizards: enhancements for duplicate projects

Both bugs illustrates that this issue hasn't been fixed yet.

Separate workspaces (like Konstantin advices in his answer) is the best option.
Modifying the .project as described in this thread is not very practical.


I think modifying the .project is a solution if it already checked out.
Another solution is during checkout to define a different name to the project.
Third solution, and the one I use is changing the project name on the source-control when creating a branch.
I also prefer one workspace so that all my preferences are correct and coherent.
I use working sets to separate branches. In the past I was closing and reopening the projects of branches, but window working set is a better approach and most views support it quite good.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜