From d233be84b81a56b80356ac0f20a1658c9a93a5dd Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Fri, 9 Sep 2022 13:35:05 +1000 Subject: [PATCH] Feat: Upgrade git-review to 2.3.1 The previous version of git-review is incompatible with the latest version of git due to renaming flags. Error: Errors running git rebase -p -i remotes/gerrit/master fatal: --preserve-merges was replaced by --rebase-merges This is fixed in 2.2.0, upgrade to 2.3.1 its more recent. Ref: https://review.opendev.org/c/opendev/git-review/+/818219 Issue-ID: RELENG-4418 Change-Id: I6057f4a197aa6ae38598b51d3ed62b8b0948db67 Signed-off-by: Anil Belur --- .../notes/upgrade-git-review-2.3.1-b3cc401a6c8ae58a.yaml | 16 ++++++++++++++++ shell/gerrit-push-patch.sh | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/upgrade-git-review-2.3.1-b3cc401a6c8ae58a.yaml diff --git a/releasenotes/notes/upgrade-git-review-2.3.1-b3cc401a6c8ae58a.yaml b/releasenotes/notes/upgrade-git-review-2.3.1-b3cc401a6c8ae58a.yaml new file mode 100644 index 00000000..0c385630 --- /dev/null +++ b/releasenotes/notes/upgrade-git-review-2.3.1-b3cc401a6c8ae58a.yaml @@ -0,0 +1,16 @@ +--- +prelude: > + Update openstack images with the auto update image requires more recent + version of git-review > 2.2. +upgrade: + - | + The previous version of git-review is incompatible with the latest version of + git due to renaming flags. This is fixed in git-review 2.2.0. +issues: + - | + Error: + + Errors running git rebase -p -i remotes/gerrit/master + fatal: --preserve-merges was replaced by --rebase-merges + + Ref: https://review.opendev.org/c/opendev/git-review/+/818219 diff --git a/shell/gerrit-push-patch.sh b/shell/gerrit-push-patch.sh index ab9d57bc..a1d67e64 100644 --- a/shell/gerrit-push-patch.sh +++ b/shell/gerrit-push-patch.sh @@ -47,7 +47,7 @@ echo -e "INFO: Staged for commit:\n$staged_commits\n" # shellcheck disable=SC1090 source ~/lf-env.sh -lf-activate-venv "git-review==1.28" +lf-activate-venv --python python3 "git-review==2.3.1" # Query for a pre-existing gerrit review query_result=$(ssh -p 29418 "$GERRIT_USER@$GERRIT_HOST" gerrit query \ -- 2.16.6