Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package git-review for openSUSE:Factory 
checked in at 2021-12-05 22:46:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/git-review (Old)
 and      /work/SRC/openSUSE:Factory/.git-review.new.31177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "git-review"

Sun Dec  5 22:46:21 2021 rev:15 rq:935776 version:2.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/git-review/git-review.changes    2019-05-07 
23:18:10.628819672 +0200
+++ /work/SRC/openSUSE:Factory/.git-review.new.31177/git-review.changes 
2021-12-05 22:47:18.805407077 +0100
@@ -1,0 +2,32 @@
+Sun Dec  5 10:29:09 UTC 2021 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 2.1.0:
+  * Add support for ???no-thin which is passed to git push
+  * 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
+  * 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 to git 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.
+- add 7182166ec00ad3645821435d72c5424b4629165f.patch:
+  * 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.
+
+-------------------------------------------------------------------

Old:
----
  git-review-1.28.0.tar.gz

New:
----
  7182166ec00ad3645821435d72c5424b4629165f.patch
  git-review-2.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ git-review.spec ++++++
--- /var/tmp/diff_new_pack.1z9b7r/_old  2021-12-05 22:47:19.209405761 +0100
+++ /var/tmp/diff_new_pack.1z9b7r/_new  2021-12-05 22:47:19.209405761 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package git-review
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,14 @@
 
 
 Name:           git-review
-Version:        1.28.0
+Version:        2.1.0
 Release:        0
 Summary:        Tool to submit code to Gerrit
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://git.openstack.org/cgit/openstack-infra/git-review
 Source:         
https://files.pythonhosted.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz
+Patch1:         
https://opendev.org/opendev/git-review/commit/7182166ec00ad3645821435d72c5424b4629165f.patch
 BuildRequires:  fdupes
 # Note that this package is intentionally not using singlespec because
 # it is not a library but a plain CLI tool, and it doesn't make sense to
@@ -34,12 +35,9 @@
 BuildRequires:  python3-pbr
 BuildRequires:  python3-requests >= 1.1
 BuildRequires:  python3-setuptools
-BuildRequires:  python3-six
 BuildRequires:  python3-stestr
-BuildRequires:  python3-testtools >= 0.9.34
 Requires:       python3-requests >= 1.1
 Requires:       python3-setuptools
-Requires:       python3-six
 Provides:       python3-git-review = %version
 Obsoletes:      python3-git-review < %version
 BuildArch:      noarch
@@ -51,7 +49,7 @@
 review.
 
 %prep
-%setup -q -n git-review-%{version}
+%autosetup -p1 -n git-review-%{version}
 
 %build
 %python3_build

++++++ 7182166ec00ad3645821435d72c5424b4629165f.patch ++++++
>From 7182166ec00ad3645821435d72c5424b4629165f Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pie...@stackhpc.com>
Date: Wed, 17 Nov 2021 12:29:06 +0100
Subject: [PATCH] Fix use of removed --preserve-merges option

The --preserve-merges (-p) option was replaced by --rebase-merges (-r).
This fixes the following error when using git version 2.34.0:

    Errors running git rebase -p -i remotes/gerrit/stable/xena
    fatal: --preserve-merges was replaced by --rebase-merges

In order to keep compatibility with git < 2.18.0 we detect the git
version and use the old --preserve-merges flag when the version is older
than 2.18.0.

Co-Authored-By: Clark Boylan <clark.boy...@gmail.com>
Change-Id: I04de3d0f20aa6bafcf746b7706d61dd9b9af296c
---
 git_review/cmd.py                   | 23 +++++++++++++++++++----
 git_review/tests/test_git_review.py | 29 +++++++++++++++++++----------
 2 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/git_review/cmd.py b/git_review/cmd.py
index 16b613ac..9215b5d1 100644
--- a/git_review/cmd.py
+++ b/git_review/cmd.py
@@ -909,10 +909,25 @@ def rebase_changes(branch, remote, interactive=True):
                   "re-run with the '-R' option enabled." % (branch, remote))
         sys.exit(1)
 
-    if interactive:
-        cmd = "git rebase -p -i %s" % remote_branch
-    else:
-        cmd = "git rebase -p %s" % remote_branch
+    # Determine git version to set rebase flags below.
+    output = run_command("git version")
+    rebase_flag = "--rebase-merges"
+    if "git version" in output:
+        try:
+            v = output.rsplit(None, 1)[1]
+            gitv = tuple(map(int, v.split('.')[:3]))
+            if gitv < (2, 18, 0):
+                rebase_flag = "--preserve-merges"
+        except Exception:
+            # We tried to determine the version and failed. Use current git
+            # flag as fallback.
+            warn("Could not determine git version. "
+                 "Using modern git rebase flags.")
+
+    interactive_flag = interactive and '-i' or ''
+
+    cmd = "git rebase %s %s %s" % \
+        (rebase_flag, interactive_flag, remote_branch)
 
     (status, output) = run_command_status(cmd, GIT_EDITOR='true')
     if status != 0:
diff --git a/git_review/tests/test_git_review.py 
b/git_review/tests/test_git_review.py
index 4717bdde..dcb92323 100644
--- a/git_review/tests/test_git_review.py
+++ b/git_review/tests/test_git_review.py
@@ -323,9 +323,11 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase):
                             'create conflict with master')
 
         exc = self.assertRaises(Exception, self._run_git_review)
-        self.assertIn(
-            "Errors running git rebase -p -i remotes/%s/master" % self._remote,
-            exc.args[0])
+        rebased = ("Errors running git rebase --rebase-merges "
+                   "-i remotes/%s/master" % self._remote in exc.args[0] or
+                   "Errors running git rebase --preserve-merges "
+                   "-i remotes/%s/master" % self._remote in exc.args[0])
+        self.assertTrue(rebased)
         self.assertIn("It is likely that your change has a merge conflict.",
                       exc.args[0])
 
@@ -341,9 +343,11 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase):
                             self._dir('test', 'new_test_file.txt'))
 
         review_res = self._run_git_review('-v')
-        self.assertIn(
-            "Running: git rebase -p -i remotes/%s/master" % self._remote,
-            review_res)
+        rebased = ("Running: git rebase --rebase-merges "
+                   "-i remotes/%s/master" % self._remote in review_res or
+                   "Running: git rebase --preserve-merges "
+                   "-i remotes/%s/master" % self._remote in review_res)
+        self.assertTrue(rebased)
         self.assertEqual(self._run_git('rev-parse', 'HEAD^1'), head_1)
 
     def test_uploads_with_nondefault_rebase(self):
@@ -383,8 +387,10 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase):
 
         review_res = self._run_git_review('-v')
         # no rebase needed; if it breaks it would try to rebase to master
-        self.assertNotIn("Running: git rebase -p -i remotes/origin/master",
-                         review_res)
+        self.assertNotIn("Running: git rebase --rebase-merges "
+                         "-i remotes/origin/master", review_res)
+        self.assertNotIn("Running: git rebase --preserve-merges "
+                         "-i remotes/origin/master", review_res)
         # Don't need to query gerrit for the branch as the second half
         # of this test will work only if the branch was correctly
         # stored in gerrit
@@ -401,8 +407,11 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase):
         self.assertEqual(change_id, new_change_id)
         review_res = self._run_git_review('-v')
         # caused the right thing to happen
-        self.assertIn("Running: git rebase -p -i remotes/origin/maint",
-                      review_res)
+        rebased = ("Running: git rebase --rebase-merges "
+                   "-i remotes/origin/maint" in review_res or
+                   "Running: git rebase --preserve-merges "
+                   "-i remotes/origin/maint" in review_res)
+        self.assertTrue(rebased)
 
         # track different branch than expected in changeset
         branch = self._run_git('rev-parse', '--abbrev-ref', 'HEAD')
++++++ git-review-1.28.0.tar.gz -> git-review-2.1.0.tar.gz ++++++
++++ 2231 lines of diff (skipped)

Reply via email to