Bug 384688 - Fetch from Gerrit should created a branch for the change and not for the patch set
Summary: Fetch from Gerrit should created a branch for the change and not for the patc...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-10 03:07 EDT by Edwin Kempin CLA
Modified: 2013-03-07 17:05 EST (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 Edwin Kempin CLA 2012-07-10 03:07:59 EDT
The 'Fetch from Gerrit...' action allows to fetch a certain patch set from Gerrit. A new branch is created for this. The new branch is named after the patch set that was fetched from Gerrit, e.g. 'change/94032/3'. 

When a new patch set for the same change is uploaded to Gerrit, the user has to do the same action which created another new branch, e.g. 'change/94032/4'. 

It would be more convinient if fetching a patch set from Gerrit results in a branch named after the change, e.g. 'change/94032' and then to have a Update/Fetch/Refresh action on this branch which allows to get the latest patch set of this change from Gerrit.
Comment 1 Tomasz Zarna CLA 2013-03-07 06:08:39 EST
What if you would like to compare two patch sets? Or checkout a file change from the first patch (while on second or third) which wasn't that bad actually?

Beside, the Fetch from Gerrit dialog allows you to enter the new branch name. Not sure if this is available in 2.0 you're using.
Comment 2 Edwin Kempin CLA 2013-03-07 09:00:43 EST
I'm proposing here to change the default name for the branch that is created when fetching a patch set from Gerrit. I know that it is possible to manually enter another branch name.

I believe the main use case for fetching a change from Gerrit, is to work on this change and to push a next patch set. At the moment I create a new commit in this branch, the branch name is wrong if it's named after the patch set that was fetched initially.

It's the nature of a branch that it can change by committing changes. If it's the intention to have a fixed pointer to a certain patch set, it should probably be a tag?

> What if you would like to compare two patch sets? Or checkout a file change from the first patch (while on second or third) which wasn't that bad actually?
That's a good point, for comparing I would simply use the Gerrit WebUI or the Gerrit Mylyn Connector.
If I want to see several patch sets in Egit, I could still fetch them and enter a new branch name manually.