DESCRIPTION

Topic input on PushToGerritPage

Give the user a nicer way to define a topic when pushing to Gerrit.
Previously, a topic could be set only by appending "/<topic>" or
"%topic=<topic>" to the Gerrit branch.

Add a new text field for the topic, plus a new checkbox to select
whether a topic should be set at all.

State of both fields is persisted per local branch and restored when
the dialog is re-opened. This information is stored in the git config:

  [branch "someLocalBranch"]
    gerritTopicUse = [true, false]
    gerritTopic = <topic>

Topics must follow a few rules:
* they must not contain whitespace.
* they must not contain both commas and percent signs (either one is
  fine, though).
This is because of Gerrit restrictions. The page does validate the topic
field and prevents pushing if an invalid topic is specified (and "Use
topic" is selected).

If no topic is defined explicitly, it defaults to the local branch name.
Setting a topic explicitly overrides a possible topic specification
given in the branch field. If "Use topic" is selected and the topic
field is empty, the topic at Gerrit is cleared.

The topic field provides content assist listing the last 20 valid topics
used for the repository.

Bug: 449493
Change-Id: Idf22e0b8e4544e85cbfda5f1424a37eb746ade19
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-05-04 06:01:33.000000000

Uploaded patch set 1.

-------------------------------------
author: Alayna Houston
date: 2016-05-04 06:06:37.000000000

Patch Set 1:

(1 comment)

Line:17, /COMMIT_MSG -> Unless we're in "detached HEAD".

It's stored in the git config as opposed to the dialog settings because that way it'll vanish automatically when a branch is deleted. Otherwise we'd have to introduce some garbage collection on entries in dialog settings, and when a branch is deleted and later a new branch with the same name is created, we might even pick up the last used topic for the former branch.

-------------------------------------
author: Brenden Conley
date: 2016-05-04 06:11:35.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2016-05-04 06:17:36.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/8502/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-05-04 06:57:59.000000000

Patch Set 1: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2016-05-04 07:27:12.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Douglas Trujillo
date: 2016-05-09 21:31:16.000000000

Patch Set 1:

(1 comment)

this works nicely :-)

Line:93, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> why not "\p{javaWhitespace}" ?

https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html

-------------------------------------
author: Alayna Houston
date: 2016-05-10 18:11:46.000000000

Patch Set 1:

(1 comment)

Line:93, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java -> Done

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-05-11 06:57:08.000000000

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

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