DESCRIPTION

Harmonize Gerrit fetch and push operation availability

Determining whether a refspec is for Gerrit must be in synch with the
ResourcePropertyTester. Moreover, fetch and push refspecs must be
considered separately.

With that in place, add new properties to the property tester:
canFetchFromGerrit and canPushToGerrit. Use these properties to
determine visibility of the "Push to Gerrit..." and "Fetch from
Gerrit..." commands such that they are visible only if they can be
performed.

Bug: 493352
Change-Id: Idc66e6a912134d8979b3fad4ce6db4395388a1e2
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-05-23 04:51:18.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-05-23 04:51:24.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8615/

-------------------------------------
author: Brenden Conley
date: 2016-05-23 05:18:54.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/8615/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2016-05-23 05:20:29.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8616/

-------------------------------------
author: Brenden Conley
date: 2016-05-23 05:44:51.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/8616/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2016-05-25 11:16:48.000000000

Patch Set 1:

(2 comments)

Line:109, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ResourcePropertyTester.java -> else if ?

Line:177, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java -> I think if a user decides to not fetch git notes (e.g. by deleting the corresponding refspec from the git configuration) this shouldn't disable "Fetch from Gerrit". Maybe we need an explicit new git config option to remember which URLs are referring to a Gerrit server

-------------------------------------
author: Alayna Houston
date: 2016-05-25 11:26:24.000000000

Patch Set 1:

(2 comments)

Line:109, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ResourcePropertyTester.java -> If I had written this method originally: yes. Here, I just kept with the existing style (see all the if's below). It doesn't really matter since each "if" returns from the method. So I can just as well change it to "else if". Whatever you like better.

Line:177, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/gerrit/GerritUtil.java -> Maybe. Let's do that in a later change, though. This is just what the ResourcePropertyTester did until now.

-------------------------------------
author: Douglas Trujillo
date: 2016-05-25 11:34:16.000000000

Patch Set 2: Patch Set 1 was rebased

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-05-25 15:41:53.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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