denio7 / egit

Automatically exported from code.google.com/p/egit
0 stars 0 forks source link

egit problem with sym linked eclipse project dirs #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

a
What steps will reproduce the problem?

1. git clone git://github.com/stepheneb/workspace_with_nested_projects.git

  dir structure:

    flatten_projects.rb
    projects/
      project-a/
        src/
          HelloFromA.java
        bin/
      project-b/
        src/
          HelloFromB.java
        bin/

2. cd workspace_with_nested_projects
3. ruby flatten_projects.rb

  creates workspace dir with symbolic links to project-a and project-b

  flatten_projects.rb
  projects/
    project-a/
      src/
        HelloFromA.java
      bin/
    project-b/
      src/
        HelloFromB.java
      bin/
  workspace/
    project-a -> ../projects/project-a
    project-b -> ../projects/project-b

4. make new Eclipse workspace in 'workspace' dir
5. import projects
6. enable team/sharing/git for both projects

What is the expected output? 

Projects listed without tracked files marked as untracked

What do you see instead?

Projects listed WITH tracked files marked as untracked

What version of the product are you using? On what operating system?

egit: using v0.4.0.200901041117
eclipse 3.4.1
macosx 10.5.6

Please provide any additional information below.

This problem won't occur on Windows because of the lack of support for symlinks.

See email thread: http://article.gmane.org/gmane.comp.version-control.git/105525

Original issue reported on code.google.com by Stephen....@gmail.com on 13 Jan 2009 at 11:25

GoogleCodeExporter commented 9 years ago
[I wanted this suggestion with the issue for when I get a chance to look at  
it.]

I wrote on the git list:

  Can you suggest where in the egit code I should look to see if I can fix this?

Robin responded:

There may be more than one place. 

Take a look at GitResourceDecorator. 

We map from resources using code like this:
    RepositoryMapping.getMapping(rsrc) // <-- prime suspect
    Repository.getRepoRelativePath(rsrc)
    Repository.getWorkDir
    Repository.isResourceChanged

I'm not entirely sure this is the correct way, but it probably has no
bearing on your problem.

    GitResourceDecorator decorator = getActiveDecorator();

It would be nice with a unit test for this. (Not necessarily the decorator,
but the methods used for it).

Original comment by Stephen....@gmail.com on 3 Feb 2009 at 10:06

GoogleCodeExporter commented 9 years ago
FYI: egit does work well with hard-links instead of soft links.

See this ruby script example that implements concept for a repo with about 50 
nested projects:

http://svn.concord.org/svn/projects/trunk/common/flatten_projects.rb

Original comment by Stephen....@gmail.com on 25 Feb 2009 at 2:58

GoogleCodeExporter commented 9 years ago
Follow-up tentative patch posted on the ML

Original comment by robin.ro...@gmail.com on 11 Mar 2009 at 10:20