DESCRIPTION

Provide extensibility for suggesting branch names

* Extends the existing extension point for commit messages
  with branch name suggestions.
* Adds a config option for specifying the default source ref
  when branching:

  [workflow]
        defbranchstartpoint = refs/remotes/origin/master

This change is needed to enable the automatic creation and
checkout of branches based on the active task.

Bug: 309578
Change-Id: I9e26d668617481026c81a05b6ea08b97e28f620b
AlsoBy: Charlee Mccann xxx@xxx.xxx
AlsoBy: Jade Pennington xxx@xxx.xxx
Signed-off-by: Charlee Mccann xxx@xxx.xxx
Signed-off-by: Quinten Rogers xxx@xxx.xxx

COMMENTS

author: Quinten Rogers
date: 2014-01-07 22:01:47.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2014-01-07 22:36:33.000000000

Patch Set 8:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-07 22:55:37.000000000

Patch Set 8: Verified+1

Build Successful 

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

-------------------------------------
author: Carlie Harper
date: 2014-01-08 08:39:05.000000000

Patch Set 8: Code-Review-1

(5 comments)

Line:16, org.eclipse.egit.ui/src/org/eclipse/egit/ui/IBranchNameProvider.java -> Why should IBranchNameProvider extend ICommitMessageProvider?

Line:60, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateBranchCommand.java -> Btw. I think currently this else branch cannot be reached anymore, because according to the plugin.xml the command is only visible on RefNode, TagNode and AdditionalRefNode. Or did I miss something?

Line:62, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateBranchCommand.java -> This comment is not quite correct anymore

Line:10, /COMMIT_MSG -> This extension is somehow under the hood. You just inherit from the interface of an existing extension point (commitMessageProvider) and check in the coding if the provider of commitMessageProvider also implements the new interface. So this extension possibility is not made explicit in the plugin.xml. Is there a good reason for this?

Line:15, /COMMIT_MSG -> Please do this in a separate commit.

You may also add this behavior when the user selects "New Branch..." on the "Branches" dialog without having selected a reference (BranchSelectionAndEditDialog).

-------------------------------------
author: Quinten Rogers
date: 2014-01-12 19:58:40.000000000

Patch Set 8:

@Charlee Mccann and Jade Pennington:
Can you step in here and give Stefan feedback for his questions? I know nearly nothing about your implemenation and it would be nice to hear and learn about your ideas from April 2012.
With some input from I could try to improve the code.
Without it I can just take care  to submit the "config option for specifying the default source ref" in a separate commit.

-------------------------------------
author: Charlee Mccann
date: 2014-01-13 15:40:21.000000000

Patch Set 8:

(3 comments)

Line:16, org.eclipse.egit.ui/src/org/eclipse/egit/ui/IBranchNameProvider.java -> Makes sense to split.

Line:60, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateBranchCommand.java -> Not sure. Manuel?

Line:10, /COMMIT_MSG -> I think the original reason may have been to minimize change since there is only one implementation. I agree though that it would make sense to split the extension point since the functionality could in theory be implemented by different providers.

-------------------------------------
author: Quinten Rogers
date: 2014-01-23 19:00:10.000000000

Patch Set 8:

Because of lack of feedback about the "extension point" during the last days and my lack of knowledge about this stuff I start now moving the code for "Adding a config option for specifying the default source when branching" into a separate commit as suggested by Carlie Harper.

-------------------------------------
author: Quinten Rogers
date: 2014-02-01 21:45:26.000000000

Patch Set 8:

(1 comment)

Line:15, /COMMIT_MSG -> I have committed the changes in my working copy. Shall I push this new commit without a gerrit Change-ID to start a new review?

-------------------------------------
author: Carlie Harper
date: 2014-02-03 08:24:01.000000000

Patch Set 8:

(1 comment)

Line:15, /COMMIT_MSG -> Yes, please push it as another change.

Note that you can also create a Change-Id locally when you ommit. This is described here: http://wiki.eclipse.org/EGit/Contributor_Guide#Install_the_commit-msg_hook_in_your_repository.

I use the Gerrit configuration wizard in eclipse (http://wiki.eclipse.org/EGit/User_Guide#Gerrit_Configuration). After a repository is configured with the wizard, the Change-Id-Button is selected automatically, and the push goes to refs/for/master.

-------------------------------------
author: Quinten Rogers
date: 2014-02-10 21:09:45.000000000

Patch Set 8:

(3 comments)

Finished only the separation of the two commits.
Now I will try to split of the extension point and update all downstream commits accordingly.

Line:60, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateBranchCommand.java -> I removed the complete else block, because I interpret the plugin.xml configuration in the same way as you and was also with manual test not able to reach this else block.

Line:62, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CreateBranchCommand.java -> Done

Line:15, /COMMIT_MSG -> Done.
config option for specifying the default source ref when branching is not committed and has its own review, see https://git.eclipse.org/r/#/c/21785/1

-------------------------------------
author: Quinten Rogers
date: 2014-02-27 19:30:37.000000000

Patch Set 8:

(2 comments)

With patch set 10 I provide an own extension point and an extension to provide branch name suggestions.

It was my first extension point I developed and I did more or less a copy&past and rename of the ICommitMessageProvider extension point.
Please do a detailed review if I missed something by mistake, but I hope all your current comments are covered.

Line:16, org.eclipse.egit.ui/src/org/eclipse/egit/ui/IBranchNameProvider.java -> splitted
A new extension point added

Line:10, /COMMIT_MSG -> Done
new extension point for branch name suggestion added

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