Release Notes¶
2.4.0¶
New Features¶
By default,
git rebase --abort
is run automatically following a failed test rebase, letting the user rebase again on their own if that’s the state they want to be in. A-K
/--keep-rebase
option is added to get the old behavior.
For convenience,
--wip
is now synonymous with the longer--work-in-progress
option.
If
HEAD
already exists on a remote branch,git review
will now only warn and prompt for confirmation when pushing, in order to let the Gerrit server decide whether to accept or reject it.
A copy of the Gerrit upstream project’s commit-msg hook is now included directly and written to disk by default rather than pulling a remote copy. This approach is safer and more robust, but may break workflows for sites which rely on users retrieving a customized commit-msg hook. For this reason, a command-line override is provided so that users can, for example, execute
git review -s --remote-hook
to get the old behavior when setting up a new clone.
The
GIT_SSH
environment variable will now be consulted, if set, in order to determine whichssh
executable to call outside ofgit
invocations, for consistency.
A new
--hashtags
option allows specifying a list of one or more Gerrit hashtag strings, separated by commas. Note that spaces are not allowed either within a hashtag or between separators.
New
--message
option can be used to include a custom patchset message when pushing.
2.3.1¶
Bug Fixes¶
Improved version string parsing for Git in order to no longer break on Mac OSX/Darwin systems (story 2010002).
2.3.0¶
Upgrade Notes¶
Python 3.5 is no longer supported.
Git 2.10.0 or later is required as git-review now needs the
--no-show-signature
option for git-log.
Bug Fixes¶
Git’s log.ShowSignature option is now supported. Previously, setting it would confuse git-review into thinking there were twice as many changes to push.
OpenSSH has deprecated its use of scp/rcp protocol in favor of SFTP, which the embedded Apache mina-sshd in widely-deployed Gerrit versions does not yet support. The default officially changed in OpenSSH 9.0 (some distributions, such as Fedora and CentOS, switched their default behavior to this as early as OpenSSH 8.7 or 8.8), leading to a
subsystem request failed on channel 0
error during commit-msg hook retrieval. Now git-review will attempt to detect whether scp’s -O option is available to force use of the legacy scp/rcp protocol, and apply it if so. Future git-review versions may change the fallback behavior once an SFTP subsystem is implemented and available for a new Gerrit release.
2.2.0¶
Bug Fixes¶
When checking for unstaged or uncommitted changes to avoid performing a test rebase, unstaged and uncommitted changes in Git submodules are now ignored since those won’t be rebased anyway.
git-review now handles the Git
core.hooksPath
configuration option correctly. Thus, it installs thecommit-msg
hook into thecore.hooksPath
directory, if that option is set. Otherwise, it continues to install the hook into.git/hooks
, relative to the root of the checkout.
With Git 2.18.0 and later, the
--rebase-merges
(-r
) option will be used in place of the deprecated--preserve-merges
(-p
) option. This fixes a critical error when git-review is used with Git versions 2.34.0 onward, where the old option is no longer available.
2.1.0¶
New Features¶
Add support for –no-thin which is passed to git push. This is useful to work around situations where Gerrit’s JGit and git-review’s C git implementations cannot agree on the pack file contents used to transfer a push. When they disagree you see this as unpack failures due to missing trees. Using –no-thin avoids complicated negotiations and works around this problem.
2.0.0¶
New Features¶
A new
gitreview.branchauthor
option allows configuring the change author (owner) name part of the autocreated branch name when downloading changes.
A new
gitreview.notopic
configuration setting makes git-review always behave as if the--notopic
command line option was supplied.
Added the
--notify
option, which can be used to ensure specified receivers receives email notifications
Upgrade Notes¶
Not really a deprecation so much as a removal, Gerrit 2.15 (released in 2017) ceased providing a draft state for changes, and many large sites were disabling support for it far earlier than that. As of now, git-review has removed the
-D
and--draft
options entirely, and so can no longer push draft changes on old Gerrit deployments which still allowed them.
As of this release, git-review no longer supports running under the Python 2.7 interpreter. The major version component has been increased accordingly. Users wishing to use git-review with Python 2.7 can cap their installations like
pip install "git-review<2"
, though pip version 9 and later will use python_requires package metadata to avoid installing git-review on an unsupported interpreter. Future removal of support for Python 3 minor versions will only result in a minor version increase for corresponding git-review releases.
Bug Fixes¶
The Change-Id generating commit hook is now installed into any detected Git submodules, so that it will take effect when creating changes within a submodule and not just in the parent repository.
Encoding was corrected for Git credentials, which was previously causing HTTP authentication to fail under some Python 3 versions.
Change download functions now preserve any unapplied local edits on the branch when attempting to reset the worktree.
The
--no-follow-tags
option togit push
is now used for all pushes, so that git-review won’t error when encountering a local tag which is absent from Gerrit.
For safety, attempts to push a commit with unstaged or uncommitted changes in the worktree will be caught and an error reported, rather than leaving it up to
git rebase
to spot them. This addresses a situation where users enabling rebase.autostash would otherwise experience data loss when the test rebase is subsequently reset.
1.28.0¶
Upgrade Notes¶
Support for auto-configuration of topic names based on the presence of keywords in the commit message is removed. Previously, keywords such as
bug
,bp
orlp
followed by a number would result in branch names containing the associated number, e.g.bug/123
. This feature was OpenStack specific, was a frequent source of bugs and clearly wasn’t being used that often, given that StoryBoard is a thing now and no one had updated this feature to handle that metadata.
Bug Fixes¶
Fixes
gitreview
process exit code to align with general UNIX process exit code conventions. Specifically, default exit code changed to1
which stands for “general error”.
Fixed
usepushurl
to work when a read-only mirror being used asorigin
does not containrefs/changes
from gerrit.
If a patch has no topic, downloading it will result in a topic of
review/{owner}/{ID}
. Previously, submitting this would then set the topic to{ID}
. This was incorrect behavior and is now resolved.
1.27.0¶
New Features¶
Patch download now supports change urls. Rather than forcing users to copy only part of a URL to a review, users may now paste the whole change URL.
Upgrade Notes¶
The
-c
and--compatible
command line options have been removed. They had been there so someone could request compatibility with older Gerrits, but the need for this has gone away.
Bug Fixes¶
Fix git review -d M,N for newer gerrit. The “number” field returned via gerrit JSON can be a string (2.13) or a integer (~2.14).
Update default gerrit namespace for newer gerrit. According to Gerrit documentation for 2.15.3, refs/for/’branch’ should be used when pushing changes to Gerrit instead of refs/publish/’branch’.