Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Winfried,

On Thursday, 2013-01-03 16:50:46 +0100, Winfried Donkers wrote:

I can't work out how to update a submitted patch.
I tried ./logerrit resubmit, but that resulted in a second separate gerrit change (see 
https://gerrit.libreoffice.org/#/c/1533/ and https://gerrit.libreoffice.org/#/c/1278/).

That's because resubmit generates a new Change-Id as its intention is to
submit a completely new change instead of another patch set for the same
change. For gerrit, patch sets with the same Change-Id are grouped in
one change.

If you use  ./logerrit submit  instead of resubmit, the already created
Change-Id is kept (provided that you did a   git commit --amend   for
your further changes or rebased interactively to squash two or more
commits into one) and the commit is submitted as a new patch set of the
already exiting change.


The git push etc. lines in the documentation pages on
gerrit.libreoffice.org scare me more than that they help me (my fault,
I know).

It isn't that scary, but granted that it is a bit confusing and not for
the faint of heart if not familiar with git ;-)

Is someone willing to try to explain it to me in simple terms, preferably with the above patch as 
an example?

Basically what all these commands do is pushing a commit or series of
commits (all commits on your repo's local branch HEAD since the
corresponding remote branch's HEAD) to a specific branch of the gerrit
repository, namely refs/for/master

So, assuming that you have setup the Host logerrit in your ~/.ssh/config
with proper Hostname,Port,User and one commit on your local master
branch to review, doing things manually would be

git push ssh://logerrit/core HEAD:refs/for/master

This is exactly what ./logerrit does at the end.


Best might be to use  git review  for submitting patches, but
documentation on that to me is even more scary at the moment for
newcomers because it does not tell what to do if its setup overwrote the
commit message hook and does not warn about the strange --finish option
that works very unexpected and may leave the working tree in an
undesired state and maybe more.

However, there's
https://wiki.documentfoundation.org/Development/GitReview
and hopefully documentation can be somewhat improved.


Anyhow, for the simple use cases I think ./logerrit is a sufficient tool.


Btw, for your work-in-progress changes it could be possible to upload
them as drafts by using

git push ssh://logerrit/core HEAD:refs/draft/master

so refs/draft/master instead of refs/for/master to not have them in the
"real" to be submitted review queue. This is what a   git review --draft
does, but I'm not sure if our gerrit is setup for that. Anyone?

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack

Attachment: pgpUfetCOgWRW.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.