DESCRIPTION

Auto-configure Gerrit configuration if repository is cloned from Gerrit

If a repository is cloned over http or https protocol use Gerrit's
REST API endpoint "Get Version" [1] to find out if the repository is
hosted by a Gerrit server. In that case auto-configure the repository
for Gerrit. Configure the push refspec to HEAD:refs/for/master which
should be ok in most cases.

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-config.html#get-version

Bug: 460423
Change-Id: I30b916e279e0bc84f86abbffae241f8aab3fa8df
Signed-off-by: Douglas Trujillo xxx@xxx.xxx


COMMENTS

author: Douglas Trujillo
date: 2015-02-24 15:07:09.000000000

Uploaded patch set 3.

-------------------------------------
author: Jayvion Booth
date: 2015-02-24 15:30:48.000000000

Patch Set 3:

(3 comments)

Matthias, I haven't loaded this in IDE yet, but I have some concerns on the gerrit task, see comments in code.

I will try to do full review later.

Line:81, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java -> I was told all resources have to be closed. 
connection is a resource, so I miss try/finally/close around it.

Line:106, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java -> -We should use logging.-

No we should not catch the exception here: it is catched and logged in the caller already

Line:142, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java -> We do not need to handle error here, we can propagate it to the caller - it does this already.

-------------------------------------
author: Douglas Trujillo
date: 2015-02-24 16:00:22.000000000

Patch Set 3:

(2 comments)

Line:81, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java -> Done

Line:106, org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java -> Done

-------------------------------------
author: Brenden Conley
date: 2015-02-24 16:21:35.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/634/

-------------------------------------
author: Brenden Conley
date: 2015-02-24 16:27:59.000000000

Patch Set 3: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/634/ : FAILURE

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