SHA256
1
0
forked from pool/breezy

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

- Require the full python3 stdlib for sqlite3 import
  gh#openSUSE/python-rpm-macros#66

- Add skip_resource.setrlimit.patch to avoid tests failing in the limit
  environment of osc build, where resource.setrlimit() doesn't work
  (lp#1883125).

OBS-URL: https://build.opensuse.org/request/show/855331
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/breezy?expand=0&rev=12
This commit is contained in:
Antonio Larrosa 2020-12-15 13:27:45 +00:00 committed by Git OBS Bridge
parent 7a9183b45b
commit 1053c1de24
5 changed files with 75 additions and 45 deletions

View File

@ -1,7 +1,7 @@
=== modified file 'a/breezy/git/mapping.py' === modified file 'a/breezy/git/mapping.py'
--- a/breezy/git/mapping.py --- a/breezy/git/mapping.py
+++ b/breezy/git/mapping.py +++ b/breezy/git/mapping.py
@@ -107,6 +107,8 @@ def fix_person_identifier(text): @@ -121,6 +121,8 @@ def fix_person_identifier(text):
if b"<" not in text and b">" not in text: if b"<" not in text and b">" not in text:
username = text username = text
email = text email = text
@ -12,7 +12,7 @@
raise ValueError(text) raise ValueError(text)
--- a/breezy/git/tests/test_mapping.py --- a/breezy/git/tests/test_mapping.py
+++ b/breezy/git/tests/test_mapping.py +++ b/breezy/git/tests/test_mapping.py
@@ -442,9 +442,14 @@ class FixPersonIdentifierTests(tests.Tes @@ -443,9 +443,14 @@ class FixPersonIdentifierTests(tests.Tes
fix_person_identifier(b"bar@blah.nl")) fix_person_identifier(b"bar@blah.nl"))
def test_fix(self): def test_fix(self):

View File

@ -1,7 +1,7 @@
=== modified file 'breezy/git/branch.py' === modified file 'breezy/git/branch.py'
--- a/breezy/git/branch.py 2020-05-06 00:45:15 +0000 --- a/breezy/git/branch.py
+++ b/breezy/git/branch.py 2020-06-21 02:49:35 +0000 +++ b/breezy/git/branch.py
@@ -137,6 +137,7 @@ @@ -137,6 +137,7 @@ class InterTagsFromGitToRemoteGit(InterT
updates = {} updates = {}
conflicts = [] conflicts = []
source_tag_refs = self.source.branch.get_tag_refs() source_tag_refs = self.source.branch.get_tag_refs()
@ -9,7 +9,7 @@
def get_changed_refs(old_refs): def get_changed_refs(old_refs):
ret = dict(old_refs) ret = dict(old_refs)
@@ -150,6 +151,7 @@ @@ -150,6 +151,7 @@ class InterTagsFromGitToRemoteGit(InterT
ret[ref_name] = unpeeled ret[ref_name] = unpeeled
updates[tag_name] = self.target.branch.repository.lookup_foreign_revision_id( updates[tag_name] = self.target.branch.repository.lookup_foreign_revision_id(
peeled) peeled)
@ -17,7 +17,7 @@
self.target.branch._tag_refs = None self.target.branch._tag_refs = None
else: else:
conflicts.append( conflicts.append(
@@ -158,8 +160,14 @@ @@ -158,8 +160,14 @@ class InterTagsFromGitToRemoteGit(InterT
self.target.branch.repository.lookup_foreign_revision_id( self.target.branch.repository.lookup_foreign_revision_id(
old_refs[ref_name]))) old_refs[ref_name])))
return ret return ret
@ -33,7 +33,7 @@
return updates, set(conflicts) return updates, set(conflicts)
@@ -1170,6 +1178,7 @@ @@ -1170,6 +1178,7 @@ class InterLocalGitRemoteGitBranch(Inter
isinstance(target, RemoteGitBranch)) isinstance(target, RemoteGitBranch))
def _basic_push(self, overwrite, stop_revision, tag_selector=None): def _basic_push(self, overwrite, stop_revision, tag_selector=None):
@ -41,7 +41,7 @@
result = GitBranchPushResult() result = GitBranchPushResult()
result.source_branch = self.source result.source_branch = self.source
result.target_branch = self.target result.target_branch = self.target
@@ -1201,9 +1210,17 @@ @@ -1201,9 +1210,17 @@ class InterLocalGitRemoteGitBranch(Inter
continue continue
refs[tag_name_to_ref(name)] = sha refs[tag_name_to_ref(name)] = sha
return refs return refs
@ -60,11 +60,9 @@
return result return result
--- a/breezy/git/interrepo.py
=== modified file 'breezy/git/interrepo.py' +++ b/breezy/git/interrepo.py
--- a/breezy/git/interrepo.py 2020-02-18 03:11:01 +0000 @@ -90,6 +90,7 @@ from .repository import (
+++ b/breezy/git/interrepo.py 2020-06-21 02:49:35 +0000
@@ -90,6 +90,7 @@
) )
from .remote import ( from .remote import (
RemoteGitRepository, RemoteGitRepository,
@ -72,7 +70,7 @@
) )
from .unpeel_map import ( from .unpeel_map import (
UnpeelMap, UnpeelMap,
@@ -377,8 +378,16 @@ @@ -377,8 +378,16 @@ class InterToRemoteGitRepository(InterTo
return ret return ret
self._warn_slow() self._warn_slow()
with self.source_store.lock_read(): with self.source_store.lock_read():
@ -90,50 +88,48 @@
# FIXME: revidmap? # FIXME: revidmap?
return revidmap, self.old_refs, new_refs return revidmap, self.old_refs, new_refs
--- a/breezy/git/remote.py
=== modified file 'breezy/git/remote.py' +++ b/breezy/git/remote.py
--- a/breezy/git/remote.py 2020-06-12 17:44:18 +0000 @@ -436,10 +436,10 @@ class RemoteGitDir(GitDir):
+++ b/breezy/git/remote.py 2020-06-21 02:49:35 +0000
@@ -441,10 +441,10 @@
format=(format.encode('ascii') if format else None), format=(format.encode('ascii') if format else None),
subdirs=subdirs, subdirs=subdirs,
prefix=(prefix.encode('utf-8') if prefix else None)) prefix=(prefix.encode('utf-8') if prefix else None))
+ except HangupException as e: - except GitProtocolError as e:
+ raise parse_git_hangup(self.transport.external_url(), e) - raise parse_git_error(self.transport.external_url(), e)
except GitProtocolError as e: except HangupException as e:
raise parse_git_error(self.transport.external_url(), e) raise parse_git_hangup(self.transport.external_url(), e)
- except HangupException as e: + except GitProtocolError as e:
- raise parse_git_hangup(self.transport.external_url(), e) + raise parse_git_error(self.transport.external_url(), e)
finally: finally:
if pb is not None: if pb is not None:
pb.finished() pb.finished()
@@ -465,10 +465,10 @@ @@ -460,10 +460,10 @@ class RemoteGitDir(GitDir):
self._refs = remote_refs_dict_to_container( self._refs = remote_refs_dict_to_container(
result.refs, result.symrefs) result.refs, result.symrefs)
return result return result
+ except HangupException as e: - except GitProtocolError as e:
+ raise parse_git_hangup(self.transport.external_url(), e) - raise parse_git_error(self.transport.external_url(), e)
except GitProtocolError as e: except HangupException as e:
raise parse_git_error(self.transport.external_url(), e) raise parse_git_hangup(self.transport.external_url(), e)
- except HangupException as e: + except GitProtocolError as e:
- raise parse_git_hangup(self.transport.external_url(), e) + raise parse_git_error(self.transport.external_url(), e)
finally: finally:
if pb is not None: if pb is not None:
pb.finished() pb.finished()
@@ -488,10 +488,10 @@ @@ -483,10 +483,10 @@ class RemoteGitDir(GitDir):
return self._client.send_pack( return self._client.send_pack(
self._client_path, get_changed_refs_wrapper, self._client_path, get_changed_refs_wrapper,
generate_pack_data, progress) generate_pack_data, progress)
+ except HangupException as e: - except GitProtocolError as e:
+ raise parse_git_hangup(self.transport.external_url(), e) - raise parse_git_error(self.transport.external_url(), e)
except GitProtocolError as e: except HangupException as e:
raise parse_git_error(self.transport.external_url(), e) raise parse_git_hangup(self.transport.external_url(), e)
- except HangupException as e: + except GitProtocolError as e:
- raise parse_git_hangup(self.transport.external_url(), e) + raise parse_git_error(self.transport.external_url(), e)
finally: finally:
if pb is not None: if pb is not None:
pb.finished() pb.finished()
@@ -520,7 +520,11 @@ @@ -515,7 +515,11 @@ class RemoteGitDir(GitDir):
def generate_pack_data(have, want, ofs_delta=False): def generate_pack_data(have, want, ofs_delta=False):
return pack_objects_to_data([]) return pack_objects_to_data([])
@ -146,7 +142,7 @@
@property @property
def user_url(self): def user_url(self):
@@ -663,7 +667,18 @@ @@ -658,7 +662,18 @@ class RemoteGitDir(GitDir):
else: else:
return source_store.generate_pack_data( return source_store.generate_pack_data(
have, want, progress=progress, ofs_delta=ofs_delta) have, want, progress=progress, ofs_delta=ofs_delta)
@ -166,7 +162,7 @@
push_result.new_revid = repo.lookup_foreign_revision_id( push_result.new_revid = repo.lookup_foreign_revision_id(
new_refs[actual_refname]) new_refs[actual_refname])
if old_sha is not None: if old_sha is not None:
@@ -982,7 +997,12 @@ @@ -977,7 +992,12 @@ class RemoteGitTagDict(GitTags):
def generate_pack_data(have, want, ofs_delta=False): def generate_pack_data(have, want, ofs_delta=False):
return pack_objects_to_data([]) return pack_objects_to_data([])
@ -180,7 +176,7 @@
class RemoteGitBranch(GitBranch): class RemoteGitBranch(GitBranch):
@@ -1066,7 +1086,12 @@ @@ -1061,7 +1081,12 @@ class RemoteGitBranch(GitBranch):
return {self.ref: sha} return {self.ref: sha}
def generate_pack_data(have, want, ofs_delta=False): def generate_pack_data(have, want, ofs_delta=False):
return pack_objects_to_data([]) return pack_objects_to_data([])
@ -194,4 +190,3 @@
self._sha = sha self._sha = sha

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Sun Dec 6 21:26:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Require the full python3 stdlib for sqlite3 import
gh#openSUSE/python-rpm-macros#66
-------------------------------------------------------------------
Fri Dec 4 19:25:44 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add skip_resource.setrlimit.patch to avoid tests failing in the limit
environment of osc build, where resource.setrlimit() doesn't work
(lp#1883125).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 27 11:42:03 UTC 2020 - Antonio Larrosa <alarrosa@suse.com> Thu Aug 27 11:42:03 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -33,8 +33,13 @@ Patch2: 7551_7550.diff
Patch3: 0001-Fix-tests-with-newer-dulwich.patch Patch3: 0001-Fix-tests-with-newer-dulwich.patch
# PATCH-FIX-UPSTREAM 0002-Fix-more-tests.patch lp#1890354 alarrosa@suse.com # PATCH-FIX-UPSTREAM 0002-Fix-more-tests.patch lp#1890354 alarrosa@suse.com
Patch4: 0002-Fix-more-tests.patch Patch4: 0002-Fix-more-tests.patch
# PATCH-FIX-OPENSUSE skip_resource.setrlimit.patch lp#1883125 mcepl@suse.com
# Don't run resource.setrlimit, which is not allowed in OBS
Patch0: skip_resource.setrlimit.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
# full stdlib for sqlite3
BuildRequires: python3
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
Requires: python3-configobj Requires: python3-configobj

View File

@ -0,0 +1,17 @@
--- a/breezy/tests/blackbox/test_big_file.py
+++ b/breezy/tests/blackbox/test_big_file.py
@@ -67,10 +67,11 @@ class TestAdd(tests.TestCaseWithTranspor
def setUp(self):
super(TestAdd, self).setUp()
- previous = resource.getrlimit(RESOURCE)
- self.addCleanup(resource.setrlimit, RESOURCE, previous)
- resource.setrlimit(RESOURCE, (LIMIT, -1))
+ # previous = resource.getrlimit(RESOURCE)
+ # self.addCleanup(resource.setrlimit, RESOURCE, previous)
+ # resource.setrlimit(RESOURCE, (LIMIT, -1))
+ @tests.unittest.skip("Test doesn't work without resource.setrlimit")
def test_allocate(self):
def allocate():
"." * BIG_FILE_SIZE