1

[Update: See comments]

So lets say I have a structure like this:

/trunk/src

/trunk/platform/linux/[eclipse project]

/trunk/platform/windows/[eclipse project]

I want both project to be able to see /trunk/src, open its files and use the automatic error highlighting on those files. I've tried creating Linked Resources to the directory. This works great with nasty limitations. It never updates unless you re-import and you can't create/delete files. I tried storing a symbolic link in the git repo which apparently as of git 1.6.1 no longer works. I tried anyway and upon cloning the symbolic link comes our broken.

This is really just for ease of access to the main codebase for a multi platform project. The solution need not be elegant but it is important. So I figure I can instruct each dev to just make their own sym link to the main codebase as part of dev environment setup. Tried and these symbolic links created with ln -s do not seem to appear in Eclipse nor can they be imported.

Finally I figured I could create a General Project in /trunk/ within Eclipse. Seems Eclipse is "smart" enough to warn me that this is not possible because it detects other projects deeper in.

Any help appreciated.

Halsafar
  • 2,540
  • 4
  • 29
  • 52
  • It appears git still supports symbolic links. I just failed at testing it properly. I forgot git cannot commit empty directories. So committing a symbolic link to the main codebase within each eclipse project dir works just fine. Leaving the question up unless someone has a better solution. – Halsafar Aug 16 '11 at 04:51

1 Answers1

0

First, a comment:

'/trunk/xxx/yyy' is a SVN approach, where all branches/tags are "emulated" as directory.
You don't need them with Git. Two branches (one 'linux', one 'windows') are enough; then you can clone your repo twice, once in a 'windows' directory, one in a 'linux' directory.

Regarding a possible solution:
If the only difference between the linux and the windows platform, regarding eclipse, are the .project and .classpath files, I would actually recommend having only one repo (for your sources), with aforementioned two branches, each one including the sources and the eclipse files (tailored for each platform).

That way, the solution is much easier to maintain: one repo, one structure. Two branches.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250