DESCRIPTION

Initial commit of a GIT fetch factory

PDE Build uses fetch factories for fetching code from SCM to local discs 
for building. This implements a fetch factory which is able to clone Git
repos into a local cache location and checkout projects from there.

Bug: 289838
Signed-off-by: Rocco Fowler xxx@xxx.xxx


COMMENTS

author: Blake Oneal
date: 2010-10-13 18:16:11.000000000

Patch Set 1: Looks good to me, but someone else must approve

(6 inline comments)

Some minor nitpicks but otherwise looks good.

Line:8, org.eclipse.egit.fetchfactory/META-INF/MANIFEST.MF -> Does this need 3.6.1 or can it run with 3.6.0?

Line:5, org.eclipse.egit.fetchfactory/OSGI-INF/l10n/bundle.properties -> Trailing whitespace here

Line:31, org.eclipse.egit.fetchfactory/pom.xml -> TYCHO-168 was marked fixed for 0.7.0 - do we still need it here?

Line:229, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> Why do we need to do this? This will get rid of common characters, like - _ . which may be perfectly valid as characters in a URL.

Line:269, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> This looks as if it were copied from the CVS one. Does HEAD make sense in a Git checkout anyway? The idea (behind CVS) was to not write out the 'default' one for everything that needed doing e.g. default to HEAD. Should Git default to 'master' here instead?

Line:6, org.eclipse.egit.fetchfactory/build.properties -> Trailing white space again

-------------------------------------
author: Rocco Fowler
date: 2010-10-13 18:58:12.000000000

Patch Set 1: (4 inline comments)

Thanks for review! Answers inline.

Line:8, org.eclipse.egit.fetchfactory/META-INF/MANIFEST.MF -> Actually, it needs to be 3.7M3 because of a change that went into PDE build just today. Thanks for bringing it up. I need to figure out the correct number.

Line:31, org.eclipse.egit.fetchfactory/pom.xml -> Copied it from the other POMs. Not sure. I'm not an expert on this subject.

Line:229, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> That's for storing on the local disc. We need to get rid of any chars that could cause issues if they are contained in folder names. Another option would be to use a hash of the URL. But that would make them unreadable in case someone wants to look at the cloned repos.

Line:269, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> Yeah. It should likely be "master". But I'm not an expert on that topic. Git also uses the term "HEAD" which doesn't help with reducing confusion on my side. ;)

-------------------------------------
author: Douglas Trujillo
date: 2010-10-13 21:43:34.000000000

Patch Set 1: I would prefer that you didn't submit this

(22 inline comments)

- please format according to project conventions (see contributor guide)
- I can't compile this new bundle in eclipse, seems I miss some plugins, explain what is needed. This should later also be described in the contributor guide so that eclipse setup for contributors is always clear
-in general we look for compatibility with java 1.5 and eclipse 3.5.2 upwards (not sure if that is needed for PDE build)
- please add a test

Line:8, org.eclipse.egit.fetchfactory/META-INF/MANIFEST.MF -> in general we want egit to work with java 1.5 and eclipse 3.5.2

Line:4, org.eclipse.egit.fetchfactory/plugin.xml -> style nit: trailing whitespace and unusual blank line

Line:4, org.eclipse.egit.fetchfactory/OSGI-INF/l10n/bundle.properties -> style nit: trailing whitespace, usually we don't have a blank line here, look at plugin.properties of other egit bundles

Line:4, org.eclipse.egit.fetchfactory/.settings/org.eclipse.jdt.core.prefs -> we want egit to work with java 1.5 and eclipse 3.5.2

Line:5, org.eclipse.egit.fetchfactory/pom.xml -> style nit: leave out blank line, stick to a fixed license header

Line:3, org.eclipse.egit.fetchfactory/.classpath -> we want egit to work with java 1.5 and eclipse 3.5.2

Line:22, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> typo: s/An <code>/A <code>/

Line:29, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> missing period to end the sentence

Line:41, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> it's not excplicitly stated if the generated script relies on native git command line or if it's using jgit.

Line:52, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> style nit: unnecessary blank line

Line:55, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> why do we need two constants with the same value?

Line:65, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> could we use "repository" to make this less cryptic ?

Line:71, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> could we use "gitRepository" instead? same question for next property

Line:90, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> style nit: we don't use braces around single line blocks

Line:226, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> style nit: no braces around single line block

Line:239, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> typo: s/an/a/

Line:243, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> inconsistent javadoc, tagName is missing

I think it would make sense to describe the meaning of the parameters here (at least I don't understand what's going on here).

Line:269, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> HEAD is a symbolic link pointing to the tip of the currently checked out branch. "master" is the default branch similar to trunk in SVN but this is just convention, so probably this should be explicitly specified.

Line:307, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> style nit: avoid braces around single line block

more of these below

Line:358, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> style nit: avoid braces around single line block

Line:375, org.eclipse.egit.fetchfactory/src/org/eclipse/egit/fetchfactory/internal/GITFetchTaskFactory.java -> style nit: inconsistent camel case : repoSpecificEntry

Line:4, org.eclipse.egit.fetchfactory/build.properties -> style nit: trailing whitespace, leave out the blank line

-------------------------------------
author: Douglas Trujillo
date: 2010-10-13 21:51:47.000000000

Patch Set 1:

I recommend to always have the gerrit Change-Id in the commit message, this helps to avoid trouble when pushing a second patch-set. You may either generate it using the Change-Id checkbox in EGit (hope you commit using EGit :-) or by installing the commit message hook as described in the contributor guide. To update this change manually copy the Change-Id tag from gerrit into the amended commit before pushing it to gerrit. Otherwise you will end up with a second change in review instead of a second patchset for the same change.

-------------------------------------
