Gerrit: merging feature branches

Jan Kundr√°t jkt at kde.org
Tue Oct 28 19:40:33 GMT 2014


On Tuesday, 28 October 2014 19:13:53 CET, Marco Martin wrote:
> Gerrit question: I have a feature branch in plasma-framework 
> (mart/basicDeleteUndo), and i wanted to do the review process with gerrit.

Hi,
Gerrit is quite flexible, and supports many different use cases. It's up to 
us to agree on how to use them so that they support our work. My personal 
favorite is to use a smaller number of long-lived branches (candidates: 
master, kde4, release, etc), and use Gerrit's topics for changes which are 
somehow grouped together, yet ultimately targetted to be merged into the 
respective branch once they are ready.

A topic is set through pushing to 
refs/for/target-branch-name/your/topic/name (it can also be modified later 
on through the web UI). One can pretty easily search for a single topic, 
the links are clickable, etc.

Would this work for you? Should we define some other workflow?

Oh, and as Thomas said, in Gerrit there's always a workflow of one change 
per commit. If the worflow you're trying to use doesn't match this, then 
you would have a hard time implementing it. My personal opinion is that 
enforcing self-contained and clean commits is a reasonable thing, so I 
don't mind the need to review each change separately. A local rebase 
(perhaps an interactive one to squash related stuff together) is a great 
tool in my opinion.

> now i tried the following 3 approaches, that all fail miserably:
> * from my branch: git push gerrit HEAD:refs/for/master gives 
> [remote rejected] 
> master -> refs/for/master (no new changes)

I would like to see a picture of the graph of the changes you tried to 
push. Something like `git log --graph --decorate --pretty=oneline 
--abbrev-commit --branches --remotes HEAD` should do the trick. (Be sure to 
`git fetch` from your KDE remote beforehand.)

With kind regards,
Jan

-- 
Trojit√°, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/




More information about the kde-core-devel mailing list