Accepting request 891136 from home:mcepl:branches:devel:tools:scm

- Update to 3.2.0.
- Removed upstreamed patches:
  - 0001-Fix-tests-with-newer-dulwich.patch
  - 0002-Fix-more-tests.patch
  - 7531_7530.diff
  - 7551_7550.diff
- Skip failing tests mentioned in lp#1927523.

OBS-URL: https://build.opensuse.org/request/show/891136
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/breezy?expand=0&rev=14
This commit is contained in:
Antonio Larrosa 2021-05-10 05:28:23 +00:00 committed by Git OBS Bridge
parent e3bf02766b
commit 9057c780ec
8 changed files with 20 additions and 326 deletions

View File

@ -1,55 +0,0 @@
From 95b8f15629d6328f7c1bdf41ea3a764cccec9852 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk>
Date: Wed, 10 Jun 2020 23:49:54 +0000
Subject: [PATCH] Fix tests with newer dulwich.
---
breezy/git/tests/test_remote.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/breezy/git/tests/test_remote.py b/breezy/git/tests/test_remote.py
index 8f3bf0c770..9f1bcd3d62 100644
--- a/breezy/git/tests/test_remote.py
+++ b/breezy/git/tests/test_remote.py
@@ -151,7 +151,7 @@ class ParseHangupTests(TestCase):
def setUp(self):
super(ParseHangupTests, self).setUp()
try:
- HangupException(['foo'])
+ HangupException([b'foo'])
except TypeError:
self.skipTest('dulwich version too old')
@@ -162,18 +162,18 @@ def test_not_set(self):
def test_single_line(self):
self.assertEqual(
RemoteGitError('foo bar'),
- parse_git_hangup('http://', HangupException(['foo bar'])))
+ parse_git_hangup('http://', HangupException([b'foo bar'])))
def test_multi_lines(self):
self.assertEqual(
RemoteGitError('foo bar\nbla bla'),
parse_git_hangup(
- 'http://', HangupException(['foo bar', 'bla bla'])))
+ 'http://', HangupException([b'foo bar', b'bla bla'])))
def test_filter_boring(self):
self.assertEqual(
RemoteGitError('foo bar'), parse_git_hangup('http://', HangupException(
- ['=======', 'foo bar', '======'])))
+ [b'=======', b'foo bar', b'======'])))
def test_permission_denied(self):
self.assertEqual(
@@ -181,8 +181,8 @@ def test_permission_denied(self):
parse_git_hangup(
'http://',
HangupException(
- ['=======',
- 'You are not allowed to push code to this project.', '', '======'])))
+ [b'=======',
+ b'You are not allowed to push code to this project.', b'', b'======'])))
class TestRemoteGitBranchFormat(TestCase):

View File

@ -1,30 +0,0 @@
From e2ff1acbe2db9a69227406ea100a7394d6d201c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk>
Date: Thu, 11 Jun 2020 00:45:23 +0000
Subject: [PATCH] Fix more tests.
---
breezy/git/remote.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/breezy/git/remote.py b/breezy/git/remote.py
index 29256e1b91..f151dc1ca5 100644
--- a/breezy/git/remote.py
+++ b/breezy/git/remote.py
@@ -232,11 +232,13 @@ def parse_git_hangup(url, e):
return e
interesting_lines = [
line for line in stderr_lines
- if line and line.replace('=', '')]
+ if line and line.replace(b'=', b'')]
if len(interesting_lines) == 1:
interesting_line = interesting_lines[0]
- return parse_git_error(url, interesting_line)
- return RemoteGitError('\n'.join(stderr_lines))
+ return parse_git_error(
+ url, interesting_line.decode('utf-8', 'surrogateescape'))
+ return RemoteGitError(
+ b'\n'.join(stderr_lines).decode('utf-8', 'surrogateescape'))
class GitSmartTransport(Transport):

View File

@ -1,33 +0,0 @@
=== modified file 'a/breezy/git/mapping.py'
--- a/breezy/git/mapping.py
+++ b/breezy/git/mapping.py
@@ -121,6 +121,8 @@ def fix_person_identifier(text):
if b"<" not in text and b">" not in text:
username = text
email = text
+ elif b">" not in text:
+ return text + b">"
else:
if text.rindex(b">") < text.rindex(b"<"):
raise ValueError(text)
--- a/breezy/git/tests/test_mapping.py
+++ b/breezy/git/tests/test_mapping.py
@@ -443,9 +443,14 @@ class FixPersonIdentifierTests(tests.Tes
fix_person_identifier(b"bar@blah.nl"))
def test_fix(self):
- self.assertEqual(b"person <bar@blah.nl>",
- fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
- self.assertEqual(b"person <bar@blah.nl>",
- fix_person_identifier(b"person<bar@blah.nl>"))
+ self.assertEqual(
+ b"person <bar@blah.nl>",
+ fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
+ self.assertEqual(
+ b"person <bar@blah.nl>",
+ fix_person_identifier(b"person<bar@blah.nl>"))
+ self.assertEqual(
+ b'Rohan Garg <rohangarg@kubuntu.org>',
+ fix_person_identifier(b'Rohan Garg <rohangarg@kubuntu.org'))
self.assertRaises(ValueError,
fix_person_identifier, b"person >bar@blah.nl<")

View File

@ -1,192 +0,0 @@
=== modified file 'breezy/git/branch.py'
--- a/breezy/git/branch.py
+++ b/breezy/git/branch.py
@@ -137,6 +137,7 @@ class InterTagsFromGitToRemoteGit(InterT
updates = {}
conflicts = []
source_tag_refs = self.source.branch.get_tag_refs()
+ ref_to_tag_map = {}
def get_changed_refs(old_refs):
ret = dict(old_refs)
@@ -150,6 +151,7 @@ class InterTagsFromGitToRemoteGit(InterT
ret[ref_name] = unpeeled
updates[tag_name] = self.target.branch.repository.lookup_foreign_revision_id(
peeled)
+ ref_to_tag_map[ref_name] = tag_name
self.target.branch._tag_refs = None
else:
conflicts.append(
@@ -158,8 +160,14 @@ class InterTagsFromGitToRemoteGit(InterT
self.target.branch.repository.lookup_foreign_revision_id(
old_refs[ref_name])))
return ret
- self.target.branch.repository.controldir.send_pack(
+ result = self.target.branch.repository.controldir.send_pack(
get_changed_refs, lambda have, want: [])
+ if result is not None and not isinstance(result, dict):
+ for ref, error in result.ref_status.items():
+ if error:
+ warning('unable to update ref %s: %s',
+ ref, error)
+ del updates[ref_to_tag_map[ref]]
return updates, set(conflicts)
@@ -1170,6 +1178,7 @@ class InterLocalGitRemoteGitBranch(Inter
isinstance(target, RemoteGitBranch))
def _basic_push(self, overwrite, stop_revision, tag_selector=None):
+ from .remote import RemoteGitError
result = GitBranchPushResult()
result.source_branch = self.source
result.target_branch = self.target
@@ -1201,9 +1210,17 @@ class InterLocalGitRemoteGitBranch(Inter
continue
refs[tag_name_to_ref(name)] = sha
return refs
- self.target.repository.send_pack(
+ dw_result = self.target.repository.send_pack(
get_changed_refs,
self.source.repository._git.generate_pack_data)
+ if dw_result is not None and not isinstance(dw_result, dict):
+ error = dw_result.ref_status.get(self.target.ref)
+ if error:
+ raise RemoteGitError(error)
+ for ref, error in dw_result.ref_status.items():
+ if error:
+ trace.warning('unable to open ref %s: %s',
+ ref, error)
return result
--- a/breezy/git/interrepo.py
+++ b/breezy/git/interrepo.py
@@ -90,6 +90,7 @@ from .repository import (
)
from .remote import (
RemoteGitRepository,
+ RemoteGitError,
)
from .unpeel_map import (
UnpeelMap,
@@ -377,8 +378,16 @@ class InterToRemoteGitRepository(InterTo
return ret
self._warn_slow()
with self.source_store.lock_read():
- new_refs = self.target.send_pack(
+ result = self.target.send_pack(
git_update_refs, self.source_store.generate_lossy_pack_data)
+ if result is not None and not isinstance(result, dict):
+ for ref, error in result.ref_status.items():
+ if error:
+ raise RemoteGitError(
+ 'unable to update ref %r: %s' % (ref, error))
+ new_refs = result.refs
+ else: # dulwich < 0.20.3
+ new_refs = result
# FIXME: revidmap?
return revidmap, self.old_refs, new_refs
--- a/breezy/git/remote.py
+++ b/breezy/git/remote.py
@@ -436,10 +436,10 @@ class RemoteGitDir(GitDir):
format=(format.encode('ascii') if format else None),
subdirs=subdirs,
prefix=(prefix.encode('utf-8') if prefix else None))
- except GitProtocolError as e:
- raise parse_git_error(self.transport.external_url(), e)
except HangupException as e:
raise parse_git_hangup(self.transport.external_url(), e)
+ except GitProtocolError as e:
+ raise parse_git_error(self.transport.external_url(), e)
finally:
if pb is not None:
pb.finished()
@@ -460,10 +460,10 @@ class RemoteGitDir(GitDir):
self._refs = remote_refs_dict_to_container(
result.refs, result.symrefs)
return result
- except GitProtocolError as e:
- raise parse_git_error(self.transport.external_url(), e)
except HangupException as e:
raise parse_git_hangup(self.transport.external_url(), e)
+ except GitProtocolError as e:
+ raise parse_git_error(self.transport.external_url(), e)
finally:
if pb is not None:
pb.finished()
@@ -483,10 +483,10 @@ class RemoteGitDir(GitDir):
return self._client.send_pack(
self._client_path, get_changed_refs_wrapper,
generate_pack_data, progress)
- except GitProtocolError as e:
- raise parse_git_error(self.transport.external_url(), e)
except HangupException as e:
raise parse_git_hangup(self.transport.external_url(), e)
+ except GitProtocolError as e:
+ raise parse_git_error(self.transport.external_url(), e)
finally:
if pb is not None:
pb.finished()
@@ -515,7 +515,11 @@ class RemoteGitDir(GitDir):
def generate_pack_data(have, want, ofs_delta=False):
return pack_objects_to_data([])
- self.send_pack(get_changed_refs, generate_pack_data)
+ result = self.send_pack(get_changed_refs, generate_pack_data)
+ if result is not None and not isinstance(result, dict):
+ error = result.ref_status.get(refname)
+ if error:
+ raise RemoteGitError(error)
@property
def user_url(self):
@@ -658,7 +662,18 @@ class RemoteGitDir(GitDir):
else:
return source_store.generate_pack_data(
have, want, progress=progress, ofs_delta=ofs_delta)
- new_refs = self.send_pack(get_changed_refs, generate_pack_data)
+ dw_result = self.send_pack(get_changed_refs, generate_pack_data)
+ if not isinstance(dw_result, dict):
+ new_refs = dw_result.refs
+ error = dw_result.ref_status.get(actual_refname)
+ if error:
+ raise RemoteGitError(error)
+ for ref, error in dw_result.ref_status.items():
+ if error:
+ trace.warning('unable to open ref %s: %s',
+ ref, error)
+ else: # dulwich < 0.20.4
+ new_refs = dw_result
push_result.new_revid = repo.lookup_foreign_revision_id(
new_refs[actual_refname])
if old_sha is not None:
@@ -977,7 +992,12 @@ class RemoteGitTagDict(GitTags):
def generate_pack_data(have, want, ofs_delta=False):
return pack_objects_to_data([])
- self.repository.send_pack(get_changed_refs, generate_pack_data)
+ result = self.repository.send_pack(
+ get_changed_refs, generate_pack_data)
+ if result and not isinstance(result, dict):
+ error = result.ref_status.get(ref)
+ if error:
+ raise RemoteGitError(error)
class RemoteGitBranch(GitBranch):
@@ -1061,7 +1081,12 @@ class RemoteGitBranch(GitBranch):
return {self.ref: sha}
def generate_pack_data(have, want, ofs_delta=False):
return pack_objects_to_data([])
- self.repository.send_pack(get_changed_refs, generate_pack_data)
+ result = self.repository.send_pack(
+ get_changed_refs, generate_pack_data)
+ if result is not None and not isinstance(result, dict):
+ error = result.ref_status.get(self.ref)
+ if error:
+ raise RemoteGitError(error)
self._sha = sha

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1eff207403f48898fa3b3ffa7a4275197c6c58fec105ef267caf1f5fd5a6c7be
size 9389366

3
breezy-3.2.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97028f93e53128085f22051bd713cb27fcdae7755d1de9e606bafce514e9129b
size 9444372

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu May 6 15:27:20 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Update to 3.2.0.
- Removed upstreamed patches:
- 0001-Fix-tests-with-newer-dulwich.patch
- 0002-Fix-more-tests.patch
- 7531_7530.diff
- 7551_7550.diff
- Skip failing tests mentioned in lp#1927523.
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Dec 6 21:26:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de> Sun Dec 6 21:26:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package breezy # spec file for package breezy
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,22 +17,12 @@
Name: breezy Name: breezy
Version: 3.1.0 Version: 3.2.0
Release: 0 Release: 0
Summary: Friendly distributed version control system Summary: Friendly distributed version control system
License: GPL-2.0-or-later License: GPL-2.0-or-later
URL: https://www.breezy-vcs.org/ URL: https://www.breezy-vcs.org/
Source: https://files.pythonhosted.org/packages/source/b/breezy/breezy-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/b/breezy/breezy-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 7531_7530.diff lp#1882589 mcepl@suse.com
# Fix handling of a particular kind of broken committer id
Patch1: 7531_7530.diff
# PATCH-FIX-UPSTREAM 7551_7550.diff lp#1890354 alarrosa@suse.com
# Add support for new push interface in Dulwich >= 0.20.4
Patch2: 7551_7550.diff
# PATCH-FIX-UPSTREAM 0001-Fix-tests-with-newer-dulwich.patch lp#1890354 alarrosa@suse.com
Patch3: 0001-Fix-tests-with-newer-dulwich.patch
# PATCH-FIX-UPSTREAM 0002-Fix-more-tests.patch lp#1890354 alarrosa@suse.com
Patch4: 0002-Fix-more-tests.patch
# PATCH-FIX-OPENSUSE skip_resource.setrlimit.patch lp#1883125 mcepl@suse.com # PATCH-FIX-OPENSUSE skip_resource.setrlimit.patch lp#1883125 mcepl@suse.com
# Don't run resource.setrlimit, which is not allowed in OBS # Don't run resource.setrlimit, which is not allowed in OBS
Patch0: skip_resource.setrlimit.patch Patch0: skip_resource.setrlimit.patch
@ -88,6 +78,7 @@ export LANG=en_US.UTF8
# test_pack_revision - endswith first arg must be bytes or a tuple of bytes, not str # test_pack_revision - endswith first arg must be bytes or a tuple of bytes, not str
# test_ancient_{ctime,mtime} - broken on aarch64 %%arm ppc ppc64le # test_ancient_{ctime,mtime} - broken on aarch64 %%arm ppc ppc64le
# test_distant_{ctime,mtime} - broken on %%arm # test_distant_{ctime,mtime} - broken on %%arm
# test_plugins lp#1927523
%{buildroot}%{_bindir}/bzr selftest -v --parallel=fork \ %{buildroot}%{_bindir}/bzr selftest -v --parallel=fork \
-Oselftest.timeout=6000 -x bash_completion \ -Oselftest.timeout=6000 -x bash_completion \
-x breezy.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh -x test_export_pot \ -x breezy.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh -x test_export_pot \
@ -103,7 +94,9 @@ export LANG=en_US.UTF8
-x breezy.tests.test_xml.TestSerializer.test_pack_revision_5 \ -x breezy.tests.test_xml.TestSerializer.test_pack_revision_5 \
-x breezy.tests.test_xml.TestSerializer.test_revision_text_v8 \ -x breezy.tests.test_xml.TestSerializer.test_revision_text_v8 \
-x breezy.tests.test_xml.TestSerializer.test_revision_text_v7 \ -x breezy.tests.test_xml.TestSerializer.test_revision_text_v7 \
-x breezy.tests.test_xml.TestSerializer.test_revision_text_v6 -x breezy.tests.test_xml.TestSerializer.test_revision_text_v6 \
-x breezy.tests.test_plugins.TestPlugins \
-x breezy.tests.test_plugins.TestLoadingPlugins.test_plugin_with_error
%files %files
%doc NEWS README.rst README_BDIST_RPM %doc NEWS README.rst README_BDIST_RPM