Now it's possible to run something like
./logerrit submit "" wip
to auto-guess the branch, and make it WIP.
Change-Id: I099a840ad39a1674c7dc5851c0a0c1d3976ee728
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178401
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This allows to work in a branch foo, which tracks e.g. master, and
using plain ./logerrit submit, have it submit to master properly.
Change-Id: I7aaff759392250a5380853cbaea0f892461c1d77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165984
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Use ed25519 algorithms as the default key pair generation algorithm
for the public key cryptography used by ssh in order to submit
patches via 'logerrit' script. If ed25519 is not available, RSA is
used.
List of supported algorithms in OpenSSH can be obtained by invoking
this command:
ssh -Q key
Change-Id: I12ebcbb62d0752c94b8c2d5225223ceb69b7fe79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122765
Reviewed-by: guilhem <guilhem@libreoffice.org>
Tested-by: Hossein <hossein@libreoffice.org>
This way it's possible to have all test runs in a single change,
so it's easier to check different results.
Change-Id: I1aa3a229f5ee3ba12dbd2c18328d34c8a4528c07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99688
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Usernames (used for HTTP and SSH authentication) are now automatically
provisioned from SSO (along with the primary email address and display
name). Username/email collisions are fatal and need manual resolution,
but for most users the registration step should be somewhat simpler.
Also, update the documentation to reflect /settings/#SSHKeys from gerrit
3.0's UI.
Change-Id: Ia634c2f92f42b4b698543d990534ac15215a4c96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94931
Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org>
Tested-by: Jenkins
after
commit 02b5d09c0d
tdf#105204 fix shellcheck warnings in logerrit
the previous get_SHA_for_change returned a URL with a leading space,
which was previously implicitly stripped. Adding quotes prevents that
stripping, so we need to explicitly strip here
Change-Id: I5b303f6ca5b1dc7d2a369afc2c52830b1b9586eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89816
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
- double quote to prevent globbing and word splitting
- use read with -r
- handle pushd and popd failures
- escape arguments to ssh (thanks to Guilhem for the solution)
Change-Id: I5fcbb0248779a4fe3c0e50a9597874bcbf8217e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89643
Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org>
Tested-by: Jenkins
* Don't select existing ~/.ssh/id_dsa.pub. Since 7.0 (released
2015-08-11) OpenSSH servers won't accept DSA user keys anyway, so
users have likely rotated their legacy key material by now.
* The pubkey to copy into gerrit is derived from the first existing file
among ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519, and ~/.ssh/id_rsa. These
algorithms are ordered as found in PubkeyAcceptedKeyTypes' default
value as of OpenSSH 8.1. (EC keys are only supported since Gerrit
1.14.) Generate an RSA key when ~/.ssh doesn't exist, as before,
since it's still the default in ssh-keygen(1) from OpenSSH 8.1.
* In the ssh_config(5) stanza, only include the IdentityFile when a
the private key file exists. The private key material might reside
somewhere else, for instance in a smartcard or in an external agent's
key store; in both cases the ssh client can authenticate the user
without direct access to the key material. While it's possible to
set IdentityFile to a pubkey (with IdentitiesOnly={yes,no}) it's not
documented and thus shouldn't be used.
Change-Id: Id73a2798747ce5c394b0cf2d0dc40107a1f2c599
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86858
Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org>
Tested-by: Guilhem Moulin <guilhem@libreoffice.org>
Change shebang to bash since -p option is used in read command,
use $(..) instead of `..`,
double quote to prevent word splitting,
handle cd failure.
Change-Id: I2ae00bbd21754136610504f2ff6818b8d3695cc4
Reviewed-on: https://gerrit.libreoffice.org/33089
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Recently some new developers accidentally used "resubmit", intending to
upload a new revision of their change, but it actually always creates a
new gerrit change.
4e15809a78 claims that "resubmit creates a
new Change-Id for the current change and thus allow to submit changes for
review on release branches that were already reviewed on master", but
that is not actually required with gerrit versions that were in use in
the recent years, gerrit is capable of tracking Change-Id per branch.
Change-Id: I66eda4dbc6f4ff1e235105b3f55041cda88a6b60
- ./logerrit testfeature will trigger a testbuild of the
current feature branch as it is on gerrit
- ./logerrit testfeature $BRANCH will do the same for $BRANCH
- cloning to a tempdir and rm -rf'ing around isnt ideal, so
consider this as a template for your own scripting
Change-Id: I50a3c80748af82d855522f245ddbff227c8adab2
resubmit creates a new Change-Id for the current change and thus allow to submit
changes for review on release branches that were already reviewed on master.
Also hint advanced users to 'git review' which requires some more setup, but
should make things easier for regular users.
Getting this functionality into 'git review' would be likely help adoption too
-- and in python there is some sane errorchecking possible.
Change-Id: Ibea6bbfe747af160728b838c6ee236fd8f89671d
* ./logerrit review did not resolve the ChangeId to a SHA
* ./logerrit did still echo the command instead of executing it.
Change-Id: Ie4f8630f7a83134d6eb7992f4a61b5d3faf7e138