Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 449493 - when pushing to Gerrit, 'topic' should be set to branch name
Summary: when pushing to Gerrit, 'topic' should be set to branch name
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 enhancement with 1 vote (vote)
Target Milestone: 4.4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-31 13:18 EDT by Karl Pietrzak CLA
Modified: 2016-05-11 02:57 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Pietrzak CLA 2014-10-31 13:18:03 EDT
If you use git-review to push a new changeset to Gerrit, the topic of a review is automatically set to the branch name.  Perhaps egit could mimic this behavior?

I think it's just a simple matter of adding '%topic' to the push URL:

https://git.eclipse.org/r/Documentation/user-upload.html:

==============
To include a short tag associated with all of the changes in the same group, such as the local topic branch name, append it after the destination branch name. In this example the short topic tag driver/i42 will be saved on each change this push creates or updates:

git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/experimental%topic=driver/i42
==============

Thoughts?
Comment 1 Matthias Sohn CLA 2014-11-04 03:50:33 EST
we could add a topic field to the push to gerrit wizard so that the topic can be set explicitly
Comment 2 Karl Pietrzak CLA 2014-11-04 10:18:00 EST
@Matthias Sohn: Yeah, that would be great.  IMHO, the default topic should just be the name of the branch.


If someone sends me the name of the class/package I should look at, I might be able to submit a pull request. :)
Comment 3 Matthias Sohn CLA 2014-11-04 10:57:29 EST
we would appreciate you to contribute this, look at org.eclipse.egit.ui.internal.push.PushToGerritWizard and PushToGerritPage

Follow the contributor guide to push your contribution to Gerrit:
https://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 4 Eclipse Genie CLA 2016-05-04 02:01:36 EDT
New Gerrit change created: https://git.eclipse.org/r/71972
Comment 5 Eclipse Genie CLA 2016-05-11 02:57:17 EDT
Gerrit change https://git.eclipse.org/r/71972 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=1cd98d32cf9edd66a7489154643dce5b844f03e4
Comment 6 Matthias Sohn CLA 2016-05-11 02:57:37 EDT
submitted