Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 439907

Summary: Provide easy repository configuration for (non-)Gerrit repositories
Product: z_Archived Reporter: Johannes Dorn <johannes.dorn>
Component: RecommendersAssignee: Yasett Acurana <yasett.giselle>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: sewe, yasett.giselle
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/67457
https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/?id=9ef0579fbd666b8f456a98ad79404795081ff75e
Whiteboard:
Attachments:
Description Flags
Proposed alternative 'A' for UI enhancement
none
Proposed alternative 'B' for UI enhancement
none
Proposed alternative 'C' for UI enhancement
none
Prototype chosen to implement this enhancement none

Description Johannes Dorn CLA 2014-07-18 11:50:02 EDT
At the moment the user has to enter the push branch prefix to select a Git or Gerrit repository for pushing. The user has to know what that prefix is.

I propose a dropdown menu that gives the options: 
1. Git
2. Gerrit
3. Other

Selecting "Other" reveals the current text input field where the user can select the push branch prefix.

I am not yet sure how to handle the push URI field. Should we only display this field when a Gerrit or other Repository is selected? Or is there a legitimate reason to fetch from and push to separate pure git repositories? 
Opinions?
Comment 1 Andreas Sewe CLA 2014-07-18 13:22:17 EDT
(In reply to Johannes Dorn from comment #0)
> I am not yet sure how to handle the push URI field. Should we only display
> this field when a Gerrit or other Repository is selected? Or is there a
> legitimate reason to fetch from and push to separate pure git repositories? 
> Opinions?

Not sure how common it is but fetch over HTTP and push over SSH may be a valid use case; you can at least fetch in environments where every port != 80 is blocked.
Comment 2 Andreas Sewe CLA 2015-04-29 08:12:54 EDT
Classifying as enhancement request.
Comment 3 Andreas Sewe CLA 2016-02-05 05:13:27 EST
I think this requires some quick UI prototypes.

The simplest implementation would simply turn the current "branch prefix" text widget into a combo widget [1], with two prefixes already in the dropdown list ("refs/for" and "refs/heads").

However, this would not give the user any indication what "refs/for" means, i.e., that it is normally used by Gerrit.

So maybe a variant of Johannes suggestion in comment 0 would be better:

  --Branch prefix---

  O   Standard Git repository (refs/heads)
  O   Gerrit code review (refs/for)
  O   Other: [                            ]

[1] <http://www.eclipse.org/swt/widgets/>
Comment 4 Yasett Acurana CLA 2016-02-09 09:44:53 EST
(In reply to Andreas Sewe from comment #3)
> I think this requires some quick UI prototypes.
> 
> The simplest implementation would simply turn the current "branch prefix"
> text widget into a combo widget [1], with two prefixes already in the
> dropdown list ("refs/for" and "refs/heads").

Hi,

I attached three alternatives to help decide what would be more intuitive for the user.

I will also send the prototypes to the mailing list, in order to get more feedback from the contributors.
Comment 5 Yasett Acurana CLA 2016-02-09 09:48:16 EST
Created attachment 259657 [details]
Proposed alternative 'A' for UI enhancement
Comment 6 Yasett Acurana CLA 2016-02-09 09:48:43 EST
Created attachment 259658 [details]
Proposed alternative 'B' for UI enhancement
Comment 7 Yasett Acurana CLA 2016-02-09 09:49:11 EST
Created attachment 259659 [details]
Proposed alternative 'C' for UI enhancement
Comment 8 Yasett Acurana CLA 2016-02-26 08:04:27 EST
Created attachment 259956 [details]
Prototype chosen to implement this enhancement

Hi,

According to the feedback received, I attached the defined prototype for this enhancement. 
I will push a first version of the source code later today.
Comment 9 Andreas Sewe CLA 2016-02-26 08:06:48 EST
(In reply to Yasett Acurana from comment #8)
> I will push a first version of the source code later today.

Great. Just remember to push to the maintenance branch. Would be great to have this change in 2.3.1 already, rather than having to wait for 2.4.0 (which will probably be in Neon).
Comment 10 Eclipse Genie CLA 2016-02-26 15:39:35 EST
New Gerrit change created: https://git.eclipse.org/r/67457
Comment 12 Andreas Sewe CLA 2016-03-22 09:49:22 EDT
(In reply to Eclipse Genie from comment #11)
> Gerrit change https://git.eclipse.org/r/67457 was merged to [maintenance].
> Commit:
> http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/
> ?id=9ef0579fbd666b8f456a98ad79404795081ff75e

Change merged. Will be part of 2.3.1 and our Neon M6 contribution.

Thanks for the contribution, Yasett.