Bug 358274 - PDE core target package is broken in the git repository
Summary: PDE core target package is broken in the git repository
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.8 M3   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 351526
Blocks:
  Show dependency tree
 
Reported: 2011-09-20 13:02 EDT by Curtis Windatt CLA
Modified: 2011-10-25 14:38 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2011-09-20 13:02:05 EDT
No idea how it got broken or how to fix this.

For Bug 351526 the ExportTargetJob was moved from the ui plug-in to the org.eclipse.pde.internal.core.target package in the core plug-in.  The change appeared to be committed and pushed successfully in eGit.

However, the change did not include the new file (the deletion is included).
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=77b8e2b5eeab1bd803aa3e57b72d8873d388581c

Resetting (hard) my repository resulted in the file remaining unchanged, which suggests that it is tracked in some way.  Pulling from a different clone of the repository does not get the file.

Adding the file to the workspace results in some very strange behaviour. The file is not marked as untracked using the git status command (or staging view in eGit).  Trying to run an add operation or commit operation does nothing (no changes).  This also happens for any new file added to the target package.  Adding a new file to other packages appears to work correctly.
Comment 1 Curtis Windatt CLA 2011-09-20 13:03:52 EDT
Just so we can get an IBuild without errors, I am going to add the file to the exports package and update references to the class.  

Any guesses?
Comment 2 Kim Moir CLA 2011-09-20 13:13:48 EDT
I don't know how to fix this but you might want to ask for help on git@eclipse.org

https://dev.eclipse.org/mailman/listinfo/git

There are people that are available to help with git and migration questions.
Comment 3 Chris Aniszczyk CLA 2011-09-20 13:30:13 EDT
When in doubt, drop to the CLI.

What is the output of git status?
Comment 4 John Arthorne CLA 2011-09-20 13:49:16 EDT
I think the problem is your .gitignore file. It ignores core.* which will cause new files added in the "core" directory to be ignored.
Comment 5 John Arthorne CLA 2011-09-20 13:50:53 EDT
Remove that file from your .gitignore and you should be fine. You'll need to make the .gitignore change in all your active branches.
Comment 6 John Arthorne CLA 2011-09-20 13:51:55 EDT
(In reply to comment #5)
> Remove that file from your .gitignore

Er, remove that *line* from your .gitignore file...
Comment 7 Kim Moir CLA 2011-09-20 14:03:36 EDT
So should I remove the core.* from the gitignore when I do the migrations.  This is what the .gitignore looks like in the current migration docs 

cat - >gitignore <<EOF
bin/
*~
*.rej
*.bak
*.patch
javacore.*
heapdump.*
core.*
Snap.*
target/

EOF
Comment 8 Matthias Sohn CLA 2011-09-20 14:32:04 EDT
type "git help ignore" to get the man page with the details, all files matching an ignore specification will be - yep - ignored, except those which are already tracked by git.

Ignored files have no git decorator when using EGit, see "Preferences > Team > Git > Label decorations"
Comment 9 Curtis Windatt CLA 2011-09-20 14:34:42 EDT
(In reply to comment #4)
> I think the problem is your .gitignore file. It ignores core.* which will cause
> new files added in the "core" directory to be ignored.

So removing core.* didn't seem to do anything, but I tried removing Target/ and that appears to have worked.  I also pushed the change to the .gitignore file.

If core.* was a problem, then I would expect it to affect all the pde.core packages.  I haven't done any research, but I had assumed that gitignore would work from the root of the repository unless it had a leading wildcard, so I'm not sure why core.* or target/ would change anything.
Comment 10 Curtis Windatt CLA 2011-09-20 14:46:28 EDT
So everything appears to be working again.  Thanks to the quick responses!

While it wasn't the cause of our issue, the core.* could be causing problems. Does anyone know the purpose of that entry? Is it added by the migration or was it a cvsignore entry?
Comment 11 Kim Moir CLA 2011-09-20 14:59:24 EDT
It was added by the migration.
Comment 12 Curtis Windatt CLA 2011-09-20 15:03:22 EDT
(In reply to comment #7)
> So should I remove the core.* from the gitignore when I do the migrations. 
> This is what the .gitignore looks like in the current migration docs 
> 
> cat - >gitignore <<EOF
> bin/
> *~
> *.rej
> *.bak
> *.patch
> javacore.*
> heapdump.*
> core.*
> Snap.*
> target/
> 
> EOF

The core.* does not affect folders named core or files named with things like coreFoo.java so I don't think this is a problem. I would be suspicious of any folder ignores besides bin/
Comment 13 Paul Webster CLA 2011-09-20 15:07:02 EDT
(In reply to comment #12)
> > target/
> The core.* does not affect folders named core or files named with things like
> coreFoo.java so I don't think this is a problem. I would be suspicious of any
> folder ignores besides bin/

target/ was added to the default migration because it's a maven standard directory, the build output (their bin/ :-)

PW
Comment 14 John Arthorne CLA 2011-09-20 15:13:46 EDT
(In reply to comment #9)
> If core.* was a problem, then I would expect it to affect all the pde.core
> packages.  I haven't done any research, but I had assumed that gitignore would
> work from the root of the repository unless it had a leading wildcard, so I'm
> not sure why core.* or target/ would change anything.

I was thinking this was the same problem as bug 354429, but in that case the entry was "core" rather than "core.*". I agree core.* is probably fine. But the leading wildcard is not needed though, so "target/" will match a folder name at any depth (which turns out to be the root of your problem).
Comment 15 Curtis Windatt CLA 2011-10-25 14:38:21 EDT
Several improvements have been made to the root gitignore files of all projects because of similar conflicts.

Verified