git/list[1] front-page[2] threads[3] people[4] search[5] about
 

egit problem with sym linked eclipse project dirs

From
SBStephen Bannasch <stephen.bannasch@deanbrook.org>
Date
Jan 13, 2009, 20:00 UTC
Message-ID
<p0624081cc5928e2885fd@[192.168.1.114]>

To hack around Eclipse's problem with projects in nested directories I clone a repo and then create a new top-level dir that just has symbolic links to all the project directories.

However when I Team/Share with git using egit the resources become untracked when displayed in Eclipse -- they still are tracked however when I check from the command line.

---- more details ----
using v0.4.0.200901041117 of egit

I've got a large dir structure in a git repo in which there are many eclipse projects at different levels of the tree.

However Eclipse doesn't work with projects at different levels in a nested dir structure (bad Eclipse) -- see: Eclipse bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=35973

When we work with these projects with svn we checkout each one individually into it's own dir to create the flat hierarchy Eclipse needs. Updating all these separate projects takes forever -- at least compared to using Git.

I created a Ruby script to create a new dir named 'workspace' at the top level of a checkout with symbolic links to all the enclosed directories that have a .project file inside them.

http://svn.concord.org/svn/projects/trunk/common/flatten_projects.rb
or here in the git mirror:
http://gitorious.org/projects/otrunk-examples/repos/mainline/blobs/raw/5c5ca6ff830f4ad3e4d427df92c1a5dff64831b5/flatten_projects.rb
(warning: repos are public but very big)

The result is a dir: workspace/ that emulates the flat project space that Eclipse needs:

   http://gist.github.com/4658 (a bunch of these are legacy projects)

Then I open Eclipse, switch to a new Workspace, select the newly-created 'workspace' dir and import the projects to work on.

This works fine for Eclipse. The projects build and reference each other.
But when I then turn on the team/sharing/git for each project ...
The operation completes -- the git decorator appears showing [Git @ master] ...
but the files are all untracked.
Screenshots showing the sequence after importing just 7 projects:
   apple-support, framework, frameworkview, otrunk, swing, thirdparty-jars
share projects:
   http://skitch.com/stepheneb/bbnqf/skitched-20090113-144412
select git:
   http://img.skitch.com/20090113-peu5y38a1yqm4kfqasf6hh9r9t.png
iterate through each project:
   http://img.skitch.com/20090113-k6wf8xgs2bc4ehy9siscdyteqr.png
   http://img.skitch.com/20090113-jughm7eatnuum43gfuedmctrw5.png
showing untracked files on master branch:
   http://skitch.com/stepheneb/bbnqc/skitched-20090113-144646

However from the command line git shows the appropriate untracked files after an Eclipse build:

$ git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # java/core/apple-support/bin/ # java/core/framework/lib/ # java/core/frameworkview/lib/ # java/core/swing/lib/ # java/otrunk/otrunk/lib/ # java/thirdparty/phet-simulations-java/simulations/cck/cck # rails/portal/portal # workspace/

Next: Robin Rosenberg
Message 1 of 11 in “egit problem with sym linked eclipse project dirs”
  1. Stephen BannaschJan 13, 2009
  2. Robin RosenbergJan 13, 2009
  3. Stephen BannaschJan 13, 2009
  4. Stephen BannaschJan 23, 2009
  5. Robin RosenbergJan 23, 2009
  6. Add some support for symlinked projects.Robin Rosenberg, Mar 11, 2009
  7. Stephen BannaschMar 12, 2009
  8. Robin RosenbergMar 12, 2009
  9. Stephen BannaschMar 18, 2009
  10. Robin RosenbergMar 18, 2009
  11. Robin RosenbergMar 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.