DESCRIPTION

[DRAFT] Add "reviewers" section in push to gerrit dialog

Text area should contain (comma separated) list of reviewers. Reviewer
may be specified with its: name or e-mail or login.
Add prototype of person provider.

Change-Id: I254a7b4385172a1af791446860b43f561281431a


COMMENTS

author: Henry Curry
date: 2012-12-08 20:20:03.000000000

Uploaded patch set 5.

-------------------------------------
author: Henry Curry
date: 2012-12-08 20:26:38.000000000

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

It's still just a prototype. Appropriate person provided should be implemented as a part of next change (commit).

My full name is: "Henry Curry", but the last letter is one of the polish characters. Unfortunately I cannot change this letter "?" to "n" in Gerrit settings.

I will add tests as soon you will accept the feature ;)

1. I have authored 100% of the content I'm contributing
2. I have the rights to donate the content to Eclipse
3. I contribute the content under the EPL

-------------------------------------
author: Henry Curry
date: 2012-12-08 20:30:21.000000000

Patch Set 5: (3 inline comments)



Line:286, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> As a "--reviewer" Gerrit can accept:
* User's full name (specified in Gerrit user's settings)
* User's e-mail (specified in Gerrit user's settings)
* User's login (specified in Gerrit user's settings)

Should we somehow inform user what he/she can type in UI ?

Line:528, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> It's just to present how field assistance looks like and to show that "filtering" logic is sufficient to work with big amount of potential reviewers.

Line:18, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> I've idea for 3 different providers:
* provider of people defined in Eclipse's preferences (In Team -> Git subtree). User can manually add some well known reviewers. This settings may be easily shared among within developer team by using 'Workspace Mechanic' or by importin/exporting Eclipse's preferences.
* we can obtain list of users using REST endpoint that show changes. Yeas I know it will be quite slow but there is no other way to obtain users from gerrit (f you don;t have admini privileges)
* provider that obtains people from gerrit mylyn connector

-------------------------------------
author: Brenden Conley
date: 2012-12-08 20:42:20.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2012-12-08 21:05:11.000000000

Patch Set 5: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3804/ : SUCCESS

-------------------------------------
author: Clay Cameron
date: 2012-12-10 10:03:26.000000000

Patch Set 5: (5 inline comments)



Line:286, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> Have a look at Git Staging view and the way Author and Committer fields are implemented there. It's nothing fancy but they provide a simple content assist. You could do the same here.

Depending on how Gerrit handles invalid "reviewer" property you could consider checking provided value before sending it over the wire.

Line:528, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> Again, check out  Commit Dialog and maybe implement an IPersonProvider for both Commit and PushToGerrit dialogs.

Line:11, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> Not sure if keeping it internal is a good idea. I can imagine an extension point for it and an extension in Gerrit Mylyn connector providing a set of reviewers from gerrit.

Line:18, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> It sounds reasonable but I'm not sure if this needs to be part of this change. I would like to keep the change as small/simple as possible. Do you think the IPersonProvider can be extracted to a separate change? It seems that not only PushToReview dialog would benefit from that. How does it sound?

Line:23, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> How different it is from org.eclipse.jgit.lib.PersonIdent ?

-------------------------------------
author: Henry Curry
date: 2012-12-10 10:26:14.000000000

Patch Set 5: (5 inline comments)



Line:286, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> I'll look and provide some feedback (or changes) :)

"Depending on how Gerrit handles invalid "reviewer" property you could consider checking provided value before sending it over the wire."
I've ready fix for JGit to obtain "proper" error message when invalid user specified. I haven't sent it yet. I didn't want to handle this situation before pushing. I thought it would much complicated the code.

Line:528, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> I'll and provide some feedback or changes.

Line:11, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> You are absolutely right. I've realized that the location of this interface is wrong this morning. I'm currently working on one of the implementations, and I've already moved this interface.

Line:18, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> I had some doubts whether it should be part of this or upcoming changes. Probably you're right it should not be comprised within this change. I'll try to move it.

Line:23, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/IPersonProvider.java -> I've seen that class and I decided not to use it. Here are the reasons:
* There are two fields that I was not interested in: when and tzOffset
* There is emailAddress instead of login that I want to use

If you think that org.eclipse.jgit.lib.PersonIdent fits here better please let me know.

-------------------------------------
author: Henry Curry
date: 2012-12-10 13:36:57.000000000

Patch Set 5: (2 inline comments)



Line:286, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> I'm not sure what do you think by "simple content assist". The content assist that in my proposal is quite the same.
If you mean the "code complexity" the magic stuff from Staging View is implemented in UIUtils#addPreviousValuesContentProposalToText(Text, String). It is not simple and definitely I cannot simple reuse this code.

Reveiwers text is MULTI-ENTRY when Author/Commiter fields in Staging is SIGNLE-ENTRY.

Line:528, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> Do you mean I should change/enhance logic of CommitDialog to propose other users in Author/Commiter dialog ?

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