Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Frustrated - please help me - ejit/jgit source(I need to get jgit/ejit source so I can can core.autocrlf capability on windows.)
Frustrated - please help me - ejit/jgit source [message #656922] Mon, 28 February 2011 20:06 Go to next message
Rob Withers is currently offline Rob Withers
Messages: 7
Registered: February 2011
Junior Member
Good evening. I am at a loss. My initial problem is that we do distributed git mangement of our source. We have guys using linux, MacOSX, and Windows. I use Windows. We have been using msysGit. We operate with core.autocrlf set to true, and that is in the 'system' setting on my windows box, but I do not know where that file is. EDIT - found it, it is in 'msysgit\etc\gitconfig'. The global file is in c:\Users\Robert\.gitconfig.

I installed the EGit feature. While testing we discovered that it wasn't respecting the autocrlf setting in the system file. I added it to the global file. No love. I added it to the local <project>\.git\config file - no love.

I did a web search and learned that this is a known bug, that has been fixed to a certain extent in the EGit source. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=301775) I found instructions for loading some CVS based code, and then using EGit to clone the jgit and egit repositories. Fantastic....I did this.

I added a Java Project for each jgit and egit and pointed them to the local repository I just cloned. I then 'Team -> Share Project' to attach it to the git repository as known inside of Eclipse. I tried to make a change to my project (with autocrlf set to true) and commit, and it is still not converting line endings and so the entire file looks like it changed. Sad

A problem, that may be the source of this, is that there are test packages in the jgit project with errors - I need org.eclipse.jetty.* stuff. There are also errors in egit project - org.eclipse.core.* missing.

I have tried for 2 hours now to find out how to get the correct Jetty whatever (Feature, jars, distribution, ...) and I cannot get it. This: (http://wiki.eclipse.org/EGit/Contributor_Guide#Tests) says I need 'Feature: Jetty - Core: servlets and webapps'. I cannot find it anywhere. I don't understand how to get Jetty into Eclipse. There are some Jetty features, but I loaded them and they don't resolve the errors.

I have no idea why the egit project is missing org.eclipse.core.* stuff.

So, first question: where and how can I get Jetty loaded in Eclipse (Helios) to resolve jgit errors?

Second question is what do I need to do about the missing org.eclipse.core.* stuff? Did I use the wrong procedures in cloning the source repository, followed by creating a new Java Project and then Sharing with the local git repository?

My last question relates to the fact that I have the EGit Feature loaded, and then I cloned source repository and created a Java Project. When I do some EGit action, like 'Team -> Commit', will it use the source code I loaded, and therefore pick-up the fix for autocrlf?

Many, many thanks for your assistance, in advance.

Rob


EDIT: PS - I thought I would tell you about my install. I just loaded Helios, up from Galileo, last night. I went to the Marketplace and got Google Plugin, for GWT, attached the SDKs for GWT and App, then I grabbed EGit and I grabbed FindBugs. That's it. Then I imported my local project as a git repository and an existing Java Project.

[Updated on: Mon, 28 February 2011 20:58]

Report message to a moderator

ALL IS GOOD!! Re: Frustrated - please help me - ejit/jgit source [message #656926 is a reply to message #656922] Mon, 28 February 2011 21:35 Go to previous messageGo to next message
Rob Withers is currently offline Rob Withers
Messages: 7
Registered: February 2011
Junior Member
Folks, I started from scratch and it works for me now!!

I deleted Helios and reinstalled, and then loaded the Features: Google Plugin, EGit, and FindBugs.

Then I imported the third party libraries described here: http://wiki.eclipse.org/EGit/Contributor_Guide#Import_Team_P roject_Set

Then I imported jgit and egit, following the instructions here: http://wiki.eclipse.org/EGit/Contributor_Guide#From_an_insta lled_EGit_plugin

The thing I did differently is that previously I didn't like that jgit and egit imported all of those projects, so I tried to create one Java Project for jgit and one Java Project for egit, and I 'Shared Project' for each of them and pointed them to the local repository for those two. This time, I followed the instructions and Imported all existing projects.

I am using the Master branch for each, and there are a few errors in test code. However, it DOES recognize 'core.autocrlf' and all is good!

EGit is a really nice feature and I am excited to be using it instead of flipping over to the msysgit shell all the time. Nice work!
Re: ALL IS GOOD!! Re: Frustrated - please help me - ejit/jgit source [message #656932 is a reply to message #656926] Mon, 28 February 2011 22:51 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris Aniszczyk
Messages: 674
Registered: July 2009
Senior Member
I'm glad things are working for you.

But did you just want to try the latest nightly build?

http://www.eclipse.org/egit/download/

You can grab it from this p2 site...

http://download.eclipse.org/egit/updates-nightly

That's much easier than building everything from source... generally you only want to do that if you're contributing to EGit or JGit...
Re: ALL IS GOOD!! Re: Frustrated - please help me - ejit/jgit source [message #656959 is a reply to message #656932] Tue, 01 March 2011 03:02 Go to previous message
Rob Withers is currently offline Rob Withers
Messages: 7
Registered: February 2011
Junior Member
Ahh, I missed that! Thanks for pointing it out to me. I unloaded the source jgit/egit repository and projects and loaded the bleeding edge Feature.

Unfortunately, there is still a problem with autocrlf in EGit, I have discovered. It does not diff the whole file with CRLF changes to every line from the version in the HEAD. It diffs just the lines that changed. However, the diff it commits still has CRLF on the lines that changed. I cannot use it at this time.

I posted a comment on the bug for this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=301775#c18

I reloaded all the source to see if I could discover where the issue is. I see the use of EolCanonicalizingInputStream in the WorkingTreeIterator.idBufferBlob(Entry e) in calculating a hash, where it is filtering out the '\r\n' to '\n', so I am guessing that that is related to only diffing the real changes, and not every line.

However, I went looking for the code that actually does the diff between the index and the HEAD, when a CommitCommand is given, but I got completely lost.

[Updated on: Tue, 01 March 2011 03:11]

Report message to a moderator

Previous Topic:Moving file to a new project / repository
Next Topic:eGit Removing project from Package Explorer
Goto Forum:
  


Current Time: Thu Aug 21 08:19:52 EDT 2014

Powered by FUDForum. Page generated in 0.11979 seconds