Merge lp:~jelmer/brz/merge-3.1 into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/merge-3.1
Merge into: lp:brz
Diff against target: 2656 lines (+573/-380)
98 files modified
breezy/bzr/smart/server.py (+1/-1)
breezy/bzr/tests/__init__.py (+85/-0)
breezy/bzr/tests/matchers.py (+70/-0)
breezy/bzr/tests/per_bzrdir/__init__.py (+1/-1)
breezy/bzr/tests/per_bzrdir/test_bzrdir.py (+1/-1)
breezy/bzr/tests/per_inventory/__init__.py (+1/-1)
breezy/bzr/tests/per_inventory/basics.py (+1/-1)
breezy/bzr/tests/per_pack_repository.py (+9/-9)
breezy/bzr/tests/per_repository_chk/__init__.py (+2/-2)
breezy/bzr/tests/per_repository_chk/test_supported.py (+1/-1)
breezy/bzr/tests/per_repository_chk/test_unsupported.py (+1/-1)
breezy/bzr/tests/per_repository_vf/helpers.py (+6/-6)
breezy/bzr/tests/per_repository_vf/test__generate_text_key_index.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_add_inventory_by_delta.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_check.py (+2/-2)
breezy/bzr/tests/per_repository_vf/test_check_reconcile.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_fetch.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_fileid_involved.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_find_text_key_references.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_merge_directive.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_reconcile.py (+2/-2)
breezy/bzr/tests/per_repository_vf/test_refresh_data.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_repository.py (+1/-1)
breezy/bzr/tests/per_repository_vf/test_write_group.py (+1/-1)
breezy/bzr/tests/per_versionedfile.py (+12/-12)
breezy/bzr/tests/test__btree_serializer.py (+1/-1)
breezy/bzr/tests/test__chk_map.py (+4/-4)
breezy/bzr/tests/test__dirstate_helpers.py (+33/-33)
breezy/bzr/tests/test__groupcompress.py (+5/-5)
breezy/bzr/tests/test_btree_index.py (+4/-4)
breezy/bzr/tests/test_chk_map.py (+4/-4)
breezy/bzr/tests/test_chk_serializer.py (+2/-2)
breezy/bzr/tests/test_dirstate.py (+4/-4)
breezy/bzr/tests/test_generate_ids.py (+3/-3)
breezy/bzr/tests/test_groupcompress.py (+4/-4)
breezy/bzr/tests/test_index.py (+2/-2)
breezy/bzr/tests/test_inv.py (+4/-4)
breezy/bzr/tests/test_inventory_delta.py (+5/-5)
breezy/bzr/tests/test_knit.py (+10/-10)
breezy/bzr/tests/test_matchers.py (+57/-0)
breezy/bzr/tests/test_pack.py (+2/-2)
breezy/bzr/tests/test_remote.py (+16/-16)
breezy/bzr/tests/test_repository.py (+1/-1)
breezy/bzr/tests/test_serializer.py (+1/-1)
breezy/bzr/tests/test_smart_transport.py (+8/-6)
breezy/bzr/tests/test_tag.py (+45/-0)
breezy/bzr/tests/test_versionedfile.py (+2/-2)
breezy/bzr/tests/test_weave.py (+4/-4)
breezy/bzr/tests/test_workingtree_4.py (+7/-13)
breezy/bzr/tests/test_xml.py (+3/-3)
breezy/bzr/workingtree_4.py (+1/-1)
breezy/git/mapping.py (+2/-0)
breezy/git/remote.py (+5/-3)
breezy/git/tests/test_mapping.py (+9/-4)
breezy/git/tests/test_remote.py (+6/-6)
breezy/plugins/weave_fmt/repository.py (+1/-1)
breezy/tests/__init__.py (+36/-34)
breezy/tests/blackbox/test_annotate.py (+1/-1)
breezy/tests/blackbox/test_branch.py (+1/-1)
breezy/tests/blackbox/test_break_lock.py (+1/-1)
breezy/tests/blackbox/test_cat.py (+1/-1)
breezy/tests/blackbox/test_checkout.py (+1/-1)
breezy/tests/blackbox/test_commit.py (+1/-1)
breezy/tests/blackbox/test_config.py (+1/-1)
breezy/tests/blackbox/test_export.py (+1/-1)
breezy/tests/blackbox/test_info.py (+1/-1)
breezy/tests/blackbox/test_log.py (+1/-1)
breezy/tests/blackbox/test_ls.py (+1/-1)
breezy/tests/blackbox/test_pack.py (+1/-1)
breezy/tests/blackbox/test_push.py (+1/-1)
breezy/tests/blackbox/test_reconcile.py (+1/-1)
breezy/tests/blackbox/test_revno.py (+1/-1)
breezy/tests/blackbox/test_rmbranch.py (+1/-1)
breezy/tests/blackbox/test_send.py (+1/-1)
breezy/tests/blackbox/test_shared_repository.py (+1/-1)
breezy/tests/blackbox/test_sign_my_commits.py (+1/-1)
breezy/tests/blackbox/test_switch.py (+1/-1)
breezy/tests/blackbox/test_tags.py (+1/-1)
breezy/tests/blackbox/test_testament.py (+1/-1)
breezy/tests/blackbox/test_uncommit.py (+1/-1)
breezy/tests/blackbox/test_verify_signatures.py (+1/-1)
breezy/tests/matchers.py (+2/-45)
breezy/tests/per_branch/test_branch.py (+1/-2)
breezy/tests/per_interrepository/test_fetch.py (+1/-1)
breezy/tests/test__static_tuple.py (+18/-3)
breezy/tests/test_commit.py (+1/-4)
breezy/tests/test_http_response.py (+4/-0)
breezy/tests/test_lockable_files.py (+1/-1)
breezy/tests/test_matchers.py (+0/-32)
breezy/tests/test_selftest.py (+1/-1)
breezy/tests/test_server.py (+0/-4)
breezy/tests/test_tag.py (+0/-20)
breezy/tests/test_upstream_import.py (+5/-5)
breezy/tests/test_wsgi.py (+1/-1)
breezy/transport/http/__init__.py (+9/-3)
breezy/transport/http/response.py (+5/-0)
doc/developers/releasing.txt (+2/-2)
setup.py (+2/-0)
To merge this branch: bzr merge lp:~jelmer/brz/merge-3.1
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+385542@code.launchpad.net

Commit message

Merge lp:brz/3.1.

Description of the change

Merge lp:brz/3.1.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/bzr/smart/server.py'
--- breezy/bzr/smart/server.py 2020-02-18 01:57:45 +0000
+++ breezy/bzr/smart/server.py 2020-06-11 01:55:28 +0000
@@ -265,7 +265,7 @@
265 still_active = []265 still_active = []
266 for handler, thread in self._active_connections:266 for handler, thread in self._active_connections:
267 thread.join(timeout)267 thread.join(timeout)
268 if thread.isAlive():268 if thread.is_alive():
269 still_active.append((handler, thread))269 still_active.append((handler, thread))
270 self._active_connections = still_active270 self._active_connections = still_active
271271
272272
=== added directory 'breezy/bzr/tests'
=== added file 'breezy/bzr/tests/__init__.py'
--- breezy/bzr/tests/__init__.py 1970-01-01 00:00:00 +0000
+++ breezy/bzr/tests/__init__.py 2020-06-11 01:55:28 +0000
@@ -0,0 +1,85 @@
1# Copyright (C) 2007-2020 Jelmer Vernoij <jelmer@jelmer.uk>
2# Copyright (C) 2006, 2007 Canonical Ltd
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18"""The basic test suite for bzr."""
19
20from __future__ import absolute_import
21
22from io import BytesIO
23
24import time
25
26from ... import (
27 errors as bzr_errors,
28 tests,
29 )
30from ...tests.features import (
31 Feature,
32 ModuleAvailableFeature,
33 )
34
35TestCase = tests.TestCase
36TestCaseInTempDir = tests.TestCaseInTempDir
37TestCaseWithTransport = tests.TestCaseWithTransport
38TestCaseWithMemoryTransport = tests.TestCaseWithMemoryTransport
39
40
41def test_suite():
42 loader = tests.TestUtil.TestLoader()
43
44 suite = tests.TestUtil.TestSuite()
45
46 testmod_names = [
47 'test_dirstate',
48 'per_bzrdir',
49 'per_inventory',
50 'per_pack_repository',
51 'per_repository_chk',
52 'per_repository_vf',
53 'per_versionedfile',
54 'test__btree_serializer',
55 'test__chk_map',
56 'test__dirstate_helpers',
57 'test__groupcompress',
58 'test_btree_index',
59 'test_chk_map',
60 'test_chk_serializer',
61 'test_generate_ids',
62 'test_groupcompress',
63 'test_index',
64 'test_inv',
65 'test_inventory_delta',
66 'test_knit',
67 'test_matchers',
68 'test_pack',
69 'test_remote',
70 'test_smart',
71 'test_smart_request',
72 'test_smart_signals',
73 'test_smart_transport',
74 'test_serializer',
75 'test_tags',
76 'test_testament',
77 'test_versionedfile',
78 'test_workingtree_4',
79 'test_weave',
80 'test_xml',
81 ]
82 testmod_names = ['%s.%s' % (__name__, t) for t in testmod_names]
83 suite.addTests(loader.loadTestsFromModuleNames(testmod_names))
84
85 return suite
086
=== added file 'breezy/bzr/tests/matchers.py'
--- breezy/bzr/tests/matchers.py 1970-01-01 00:00:00 +0000
+++ breezy/bzr/tests/matchers.py 2020-06-11 01:55:28 +0000
@@ -0,0 +1,70 @@
1# Copyright (C) 2010 Canonical Ltd
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
17"""Matchers for breezy.
18
19Primarily test support, Matchers are used by self.assertThat in the breezy
20test suite. A matcher is a stateful test helper which can be used to determine
21if a passed object 'matches', much like a regex. If the object does not match
22the mismatch can be described in a human readable fashion. assertThat then
23raises if a mismatch occurs, showing the description as the assertion error.
24
25Matchers are designed to be more reusable and composable than layered
26assertions in Test Case objects, so they are recommended for new testing work.
27"""
28
29__all__ = [
30 'ContainsNoVfsCalls',
31 ]
32
33from breezy.bzr.smart.request import request_handlers as smart_request_handlers
34from breezy.bzr.smart import vfs
35
36from testtools.matchers import Mismatch, Matcher
37
38
39class _NoVfsCallsMismatch(Mismatch):
40 """Mismatch describing a list of HPSS calls which includes VFS requests."""
41
42 def __init__(self, vfs_calls):
43 self.vfs_calls = vfs_calls
44
45 def describe(self):
46 return "no VFS calls expected, got: %s" % ",".join([
47 "%s(%s)" % (c.method,
48 ", ".join([repr(a) for a in c.args])) for c in self.vfs_calls])
49
50
51class ContainsNoVfsCalls(Matcher):
52 """Ensure that none of the specified calls are HPSS calls."""
53
54 def __str__(self):
55 return 'ContainsNoVfsCalls()'
56
57 @classmethod
58 def match(cls, hpss_calls):
59 vfs_calls = []
60 for call in hpss_calls:
61 try:
62 request_method = smart_request_handlers.get(call.call.method)
63 except KeyError:
64 # A method we don't know about doesn't count as a VFS method.
65 continue
66 if issubclass(request_method, vfs.VfsRequest):
67 vfs_calls.append(call.call)
68 if len(vfs_calls) == 0:
69 return None
70 return _NoVfsCallsMismatch(vfs_calls)
071
=== renamed directory 'breezy/tests/per_bzrdir' => 'breezy/bzr/tests/per_bzrdir'
=== modified file 'breezy/bzr/tests/per_bzrdir/__init__.py'
--- breezy/tests/per_bzrdir/__init__.py 2017-06-11 14:07:05 +0000
+++ breezy/bzr/tests/per_bzrdir/__init__.py 2020-06-11 01:55:28 +0000
@@ -55,7 +55,7 @@
5555
56def load_tests(loader, standard_tests, pattern):56def load_tests(loader, standard_tests, pattern):
57 test_per_bzrdir = [57 test_per_bzrdir = [
58 'breezy.tests.per_bzrdir.test_bzrdir',58 'breezy.bzr.tests.per_bzrdir.test_bzrdir',
59 ]59 ]
60 submod_tests = loader.loadTestsFromModuleNames(test_per_bzrdir)60 submod_tests = loader.loadTestsFromModuleNames(test_per_bzrdir)
61 formats = [format for format in ControlDirFormat.known_formats()61 formats = [format for format in ControlDirFormat.known_formats()
6262
=== modified file 'breezy/bzr/tests/per_bzrdir/test_bzrdir.py'
--- breezy/tests/per_bzrdir/test_bzrdir.py 2020-03-22 18:52:18 +0000
+++ breezy/bzr/tests/per_bzrdir/test_bzrdir.py 2020-06-11 01:55:28 +0000
@@ -36,7 +36,7 @@
36 TestNotApplicable,36 TestNotApplicable,
37 TestSkipped,37 TestSkipped,
38 )38 )
39from breezy.tests.per_bzrdir import TestCaseWithBzrDir39from breezy.bzr.tests.per_bzrdir import TestCaseWithBzrDir
40from breezy.transport.local import (40from breezy.transport.local import (
41 LocalTransport,41 LocalTransport,
42 )42 )
4343
=== renamed directory 'breezy/tests/per_inventory' => 'breezy/bzr/tests/per_inventory'
=== modified file 'breezy/bzr/tests/per_inventory/__init__.py'
--- breezy/tests/per_inventory/__init__.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/per_inventory/__init__.py 2020-06-11 01:55:28 +0000
@@ -27,7 +27,7 @@
27def load_tests(loader, basic_tests, pattern):27def load_tests(loader, basic_tests, pattern):
28 """Generate suite containing all parameterized tests"""28 """Generate suite containing all parameterized tests"""
29 modules_to_test = [29 modules_to_test = [
30 'breezy.tests.per_inventory.basics',30 'breezy.bzr.tests.per_inventory.basics',
31 ]31 ]
32 from breezy.bzr.inventory import Inventory, CHKInventory32 from breezy.bzr.inventory import Inventory, CHKInventory
3333
3434
=== modified file 'breezy/bzr/tests/per_inventory/basics.py'
--- breezy/tests/per_inventory/basics.py 2019-10-06 11:30:57 +0000
+++ breezy/bzr/tests/per_inventory/basics.py 2020-06-11 01:55:28 +0000
@@ -35,7 +35,7 @@
35 TreeReference,35 TreeReference,
36 )36 )
3737
38from breezy.tests.per_inventory import TestCaseWithInventory38from breezy.bzr.tests.per_inventory import TestCaseWithInventory
3939
4040
41class TestInventory(TestCaseWithInventory):41class TestInventory(TestCaseWithInventory):
4242
=== renamed file 'breezy/tests/per_pack_repository.py' => 'breezy/bzr/tests/per_pack_repository.py'
--- breezy/tests/per_pack_repository.py 2020-01-30 16:13:31 +0000
+++ breezy/bzr/tests/per_pack_repository.py 2020-06-11 01:55:28 +0000
@@ -21,9 +21,9 @@
2121
22from stat import S_ISDIR22from stat import S_ISDIR
2323
24from ..bzr.btree_index import BTreeGraphIndex24from ..btree_index import BTreeGraphIndex
25from ..bzr.index import GraphIndex25from ..index import GraphIndex
26from .. import (26from ... import (
27 controldir,27 controldir,
28 errors,28 errors,
29 gpg,29 gpg,
@@ -34,21 +34,21 @@
34 transport,34 transport,
35 ui,35 ui,
36 )36 )
37from ..bzr import (37from .. import (
38 inventory,38 inventory,
39 )39 )
40from ..bzr.groupcompress_repo import RepositoryFormat2a40from ..groupcompress_repo import RepositoryFormat2a
41from ..bzr.smart import (41from ..smart import (
42 client,42 client,
43 )43 )
44from . import (44from ...tests import (
45 TestCaseWithTransport,45 TestCaseWithTransport,
46 TestNotApplicable,46 TestNotApplicable,
47 )47 )
48from ..transport import (48from ...transport import (
49 memory,49 memory,
50 )50 )
51from . import test_server51from ...tests import test_server
5252
5353
54class TestPackRepository(TestCaseWithTransport):54class TestPackRepository(TestCaseWithTransport):
5555
=== renamed directory 'breezy/tests/per_repository_chk' => 'breezy/bzr/tests/per_repository_chk'
=== modified file 'breezy/bzr/tests/per_repository_chk/__init__.py'
--- breezy/tests/per_repository_chk/__init__.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/per_repository_chk/__init__.py 2020-06-11 01:55:28 +0000
@@ -76,9 +76,9 @@
76 unsupported_scenarios.append((test_name, scenario_info))76 unsupported_scenarios.append((test_name, scenario_info))
77 result = loader.suiteClass()77 result = loader.suiteClass()
78 supported_tests = loader.loadTestsFromModuleNames([78 supported_tests = loader.loadTestsFromModuleNames([
79 'breezy.tests.per_repository_chk.test_supported'])79 'breezy.bzr.tests.per_repository_chk.test_supported'])
80 unsupported_tests = loader.loadTestsFromModuleNames([80 unsupported_tests = loader.loadTestsFromModuleNames([
81 'breezy.tests.per_repository_chk.test_unsupported'])81 'breezy.bzr.tests.per_repository_chk.test_unsupported'])
82 multiply_tests(supported_tests, supported_scenarios, result)82 multiply_tests(supported_tests, supported_scenarios, result)
83 multiply_tests(unsupported_tests, unsupported_scenarios, result)83 multiply_tests(unsupported_tests, unsupported_scenarios, result)
84 return result84 return result
8585
=== modified file 'breezy/bzr/tests/per_repository_chk/test_supported.py'
--- breezy/tests/per_repository_chk/test_supported.py 2019-05-29 03:22:34 +0000
+++ breezy/bzr/tests/per_repository_chk/test_supported.py 2020-06-11 01:55:28 +0000
@@ -27,7 +27,7 @@
27from breezy.bzr.versionedfile import VersionedFiles27from breezy.bzr.versionedfile import VersionedFiles
28from breezy.bzr.remote import RemoteRepository28from breezy.bzr.remote import RemoteRepository
29from breezy.tests import TestNotApplicable29from breezy.tests import TestNotApplicable
30from breezy.tests.per_repository_chk import TestCaseWithRepositoryCHK30from breezy.bzr.tests.per_repository_chk import TestCaseWithRepositoryCHK
3131
3232
33class TestCHKSupport(TestCaseWithRepositoryCHK):33class TestCHKSupport(TestCaseWithRepositoryCHK):
3434
=== modified file 'breezy/bzr/tests/per_repository_chk/test_unsupported.py'
--- breezy/tests/per_repository_chk/test_unsupported.py 2017-05-21 18:10:28 +0000
+++ breezy/bzr/tests/per_repository_chk/test_unsupported.py 2020-06-11 01:55:28 +0000
@@ -20,7 +20,7 @@
20attributes CHK support added should fail in known ways.20attributes CHK support added should fail in known ways.
21"""21"""
2222
23from breezy.tests.per_repository_chk import TestCaseWithRepositoryCHK23from breezy.bzr.tests.per_repository_chk import TestCaseWithRepositoryCHK
2424
2525
26class TestNoCHKSupport(TestCaseWithRepositoryCHK):26class TestNoCHKSupport(TestCaseWithRepositoryCHK):
2727
=== renamed directory 'breezy/tests/per_repository_vf' => 'breezy/bzr/tests/per_repository_vf'
=== modified file 'breezy/bzr/tests/per_repository_vf/helpers.py'
--- breezy/tests/per_repository_vf/helpers.py 2020-01-31 10:39:02 +0000
+++ breezy/bzr/tests/per_repository_vf/helpers.py 2020-06-11 01:55:28 +0000
@@ -16,17 +16,17 @@
1616
17"""Helper classes for repository implementation tests."""17"""Helper classes for repository implementation tests."""
1818
19from ... import (19from .... import (
20 osutils,20 osutils,
21 revision as _mod_revision,21 revision as _mod_revision,
22 )22 )
23from ...repository import WriteGroup23from ....repository import WriteGroup
24from ...bzr import (24from ... import (
25 inventory,25 inventory,
26 )26 )
27from ...bzr.knitrepo import RepositoryFormatKnit27from ...knitrepo import RepositoryFormatKnit
28from ..per_repository import TestCaseWithRepository28from ....tests.per_repository import TestCaseWithRepository
29from .. import TestNotApplicable29from ....tests import TestNotApplicable
3030
3131
32class TestCaseWithBrokenRevisionIndex(TestCaseWithRepository):32class TestCaseWithBrokenRevisionIndex(TestCaseWithRepository):
3333
=== modified file 'breezy/bzr/tests/per_repository_vf/test__generate_text_key_index.py'
--- breezy/tests/per_repository_vf/test__generate_text_key_index.py 2017-05-21 18:10:28 +0000
+++ breezy/bzr/tests/per_repository_vf/test__generate_text_key_index.py 2020-06-11 01:55:28 +0000
@@ -19,7 +19,7 @@
1919
2020
21from breezy.tests.scenarios import load_tests_apply_scenarios21from breezy.tests.scenarios import load_tests_apply_scenarios
22from breezy.tests.per_repository_vf import (22from breezy.bzr.tests.per_repository_vf import (
23 TestCaseWithRepository,23 TestCaseWithRepository,
24 all_repository_vf_format_scenarios,24 all_repository_vf_format_scenarios,
25 )25 )
2626
=== modified file 'breezy/bzr/tests/per_repository_vf/test_add_inventory_by_delta.py'
--- breezy/tests/per_repository_vf/test_add_inventory_by_delta.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/per_repository_vf/test_add_inventory_by_delta.py 2020-06-11 01:55:28 +0000
@@ -17,7 +17,7 @@
17"""Tests for Repository.add_inventory_by_delta."""17"""Tests for Repository.add_inventory_by_delta."""
1818
19from breezy import errors, revision19from breezy import errors, revision
20from breezy.tests.per_repository_vf import (20from breezy.bzr.tests.per_repository_vf import (
21 all_repository_vf_format_scenarios,21 all_repository_vf_format_scenarios,
22 TestCaseWithRepository22 TestCaseWithRepository
23 )23 )
2424
=== modified file 'breezy/bzr/tests/per_repository_vf/test_check.py'
--- breezy/tests/per_repository_vf/test_check.py 2019-06-29 19:54:32 +0000
+++ breezy/bzr/tests/per_repository_vf/test_check.py 2020-06-11 01:55:28 +0000
@@ -24,11 +24,11 @@
24 TestNotApplicable,24 TestNotApplicable,
25 )25 )
26from breezy.tests.scenarios import load_tests_apply_scenarios26from breezy.tests.scenarios import load_tests_apply_scenarios
27from breezy.tests.per_repository_vf import (27from breezy.bzr.tests.per_repository_vf import (
28 TestCaseWithRepository,28 TestCaseWithRepository,
29 all_repository_vf_format_scenarios,29 all_repository_vf_format_scenarios,
30 )30 )
31from breezy.tests.per_repository_vf.helpers import (31from breezy.bzr.tests.per_repository_vf.helpers import (
32 TestCaseWithBrokenRevisionIndex,32 TestCaseWithBrokenRevisionIndex,
33 )33 )
3434
3535
=== modified file 'breezy/bzr/tests/per_repository_vf/test_check_reconcile.py'
--- breezy/tests/per_repository_vf/test_check_reconcile.py 2019-05-29 03:22:34 +0000
+++ breezy/bzr/tests/per_repository_vf/test_check_reconcile.py 2020-06-11 01:55:28 +0000
@@ -34,7 +34,7 @@
34 TestNotApplicable,34 TestNotApplicable,
35 multiply_scenarios,35 multiply_scenarios,
36 )36 )
37from breezy.tests.per_repository_vf import (37from breezy.bzr.tests.per_repository_vf import (
38 TestCaseWithRepository,38 TestCaseWithRepository,
39 all_repository_vf_format_scenarios,39 all_repository_vf_format_scenarios,
40 )40 )
4141
=== modified file 'breezy/bzr/tests/per_repository_vf/test_fetch.py'
--- breezy/tests/per_repository_vf/test_fetch.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/per_repository_vf/test_fetch.py 2020-06-11 01:55:28 +0000
@@ -19,7 +19,7 @@
19from breezy.bzr import (19from breezy.bzr import (
20 vf_search,20 vf_search,
21 )21 )
22from breezy.tests.per_repository_vf import (22from breezy.bzr.tests.per_repository_vf import (
23 TestCaseWithRepository,23 TestCaseWithRepository,
24 all_repository_vf_format_scenarios,24 all_repository_vf_format_scenarios,
25 )25 )
2626
=== modified file 'breezy/bzr/tests/per_repository_vf/test_fileid_involved.py'
--- breezy/tests/per_repository_vf/test_fileid_involved.py 2019-09-21 19:27:04 +0000
+++ breezy/bzr/tests/per_repository_vf/test_fileid_involved.py 2020-06-11 01:55:28 +0000
@@ -28,7 +28,7 @@
28 remote,28 remote,
29 )29 )
30from breezy.tests.scenarios import load_tests_apply_scenarios30from breezy.tests.scenarios import load_tests_apply_scenarios
31from breezy.tests.per_repository_vf import (31from breezy.bzr.tests.per_repository_vf import (
32 TestCaseWithRepository,32 TestCaseWithRepository,
33 all_repository_vf_format_scenarios,33 all_repository_vf_format_scenarios,
34 )34 )
3535
=== modified file 'breezy/bzr/tests/per_repository_vf/test_find_text_key_references.py'
--- breezy/tests/per_repository_vf/test_find_text_key_references.py 2017-05-21 18:10:28 +0000
+++ breezy/bzr/tests/per_repository_vf/test_find_text_key_references.py 2020-06-11 01:55:28 +0000
@@ -18,7 +18,7 @@
18"""Test the find_text_key_references API."""18"""Test the find_text_key_references API."""
1919
2020
21from breezy.tests.per_repository_vf import (21from breezy.bzr.tests.per_repository_vf import (
22 TestCaseWithRepository,22 TestCaseWithRepository,
23 all_repository_vf_format_scenarios,23 all_repository_vf_format_scenarios,
24 )24 )
2525
=== modified file 'breezy/bzr/tests/per_repository_vf/test_merge_directive.py'
--- breezy/tests/per_repository_vf/test_merge_directive.py 2018-11-16 18:33:17 +0000
+++ breezy/bzr/tests/per_repository_vf/test_merge_directive.py 2020-06-11 01:55:28 +0000
@@ -28,7 +28,7 @@
28 )28 )
2929
30from breezy.tests.scenarios import load_tests_apply_scenarios30from breezy.tests.scenarios import load_tests_apply_scenarios
31from breezy.tests.per_repository_vf import (31from breezy.bzr.tests.per_repository_vf import (
32 TestCaseWithRepository,32 TestCaseWithRepository,
33 all_repository_vf_format_scenarios,33 all_repository_vf_format_scenarios,
34 )34 )
3535
=== modified file 'breezy/bzr/tests/per_repository_vf/test_reconcile.py'
--- breezy/tests/per_repository_vf/test_reconcile.py 2019-06-29 19:54:32 +0000
+++ breezy/bzr/tests/per_repository_vf/test_reconcile.py 2020-06-11 01:55:28 +0000
@@ -26,10 +26,10 @@
26from breezy.revision import Revision26from breezy.revision import Revision
27from breezy.tests import TestSkipped27from breezy.tests import TestSkipped
2828
29from breezy.tests.per_repository_vf.helpers import (29from breezy.bzr.tests.per_repository_vf.helpers import (
30 TestCaseWithBrokenRevisionIndex,30 TestCaseWithBrokenRevisionIndex,
31 )31 )
32from breezy.tests.per_repository_vf import (32from breezy.bzr.tests.per_repository_vf import (
33 TestCaseWithRepository,33 TestCaseWithRepository,
34 all_repository_vf_format_scenarios,34 all_repository_vf_format_scenarios,
35 )35 )
3636
=== modified file 'breezy/bzr/tests/per_repository_vf/test_refresh_data.py'
--- breezy/tests/per_repository_vf/test_refresh_data.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/per_repository_vf/test_refresh_data.py 2020-06-11 01:55:28 +0000
@@ -21,7 +21,7 @@
21 repository,21 repository,
22 )22 )
2323
24from breezy.tests.per_repository_vf import (24from breezy.bzr.tests.per_repository_vf import (
25 TestCaseWithRepository,25 TestCaseWithRepository,
26 all_repository_vf_format_scenarios,26 all_repository_vf_format_scenarios,
27 )27 )
2828
=== modified file 'breezy/bzr/tests/per_repository_vf/test_repository.py'
--- breezy/tests/per_repository_vf/test_repository.py 2019-06-29 13:16:26 +0000
+++ breezy/bzr/tests/per_repository_vf/test_repository.py 2020-06-11 01:55:28 +0000
@@ -30,7 +30,7 @@
30 )30 )
3131
32from breezy.tests.matchers import MatchesAncestry32from breezy.tests.matchers import MatchesAncestry
33from breezy.tests.per_repository_vf import (33from breezy.bzr.tests.per_repository_vf import (
34 TestCaseWithRepository,34 TestCaseWithRepository,
35 all_repository_vf_format_scenarios,35 all_repository_vf_format_scenarios,
36 )36 )
3737
=== modified file 'breezy/bzr/tests/per_repository_vf/test_write_group.py'
--- breezy/tests/per_repository_vf/test_write_group.py 2018-11-18 01:02:16 +0000
+++ breezy/bzr/tests/per_repository_vf/test_write_group.py 2020-06-11 01:55:28 +0000
@@ -30,7 +30,7 @@
30 remote,30 remote,
31 versionedfile,31 versionedfile,
32 )32 )
33from breezy.tests.per_repository_vf import (33from breezy.bzr.tests.per_repository_vf import (
34 TestCaseWithRepository,34 TestCaseWithRepository,
35 all_repository_vf_format_scenarios,35 all_repository_vf_format_scenarios,
36 )36 )
3737
=== renamed file 'breezy/tests/per_versionedfile.py' => 'breezy/bzr/tests/per_versionedfile.py'
--- breezy/tests/per_versionedfile.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/per_versionedfile.py 2020-06-11 01:55:28 +0000
@@ -25,7 +25,7 @@
25from io import BytesIO25from io import BytesIO
26import itertools26import itertools
2727
28from .. import (28from ... import (
29 errors,29 errors,
30 graph as _mod_graph,30 graph as _mod_graph,
31 osutils,31 osutils,
@@ -33,29 +33,29 @@
33 transport,33 transport,
34 ui,34 ui,
35 )35 )
36from ..bzr import (36from .. import (
37 groupcompress,37 groupcompress,
38 knit as _mod_knit,38 knit as _mod_knit,
39 )39 )
40from ..errors import (40from ...errors import (
41 RevisionNotPresent,41 RevisionNotPresent,
42 RevisionAlreadyPresent,42 RevisionAlreadyPresent,
43 )43 )
44from ..bzr.knit import (44from ..knit import (
45 cleanup_pack_knit,45 cleanup_pack_knit,
46 make_file_factory,46 make_file_factory,
47 make_pack_factory,47 make_pack_factory,
48 )48 )
49from . import (49from ...tests import (
50 TestCase,50 TestCase,
51 TestCaseWithMemoryTransport,51 TestCaseWithMemoryTransport,
52 TestNotApplicable,52 TestNotApplicable,
53 TestSkipped,53 TestSkipped,
54 )54 )
55from .http_utils import TestCaseWithWebserver55from ...tests.http_utils import TestCaseWithWebserver
56from ..transport.memory import MemoryTransport56from ...transport.memory import MemoryTransport
57from ..bzr import versionedfile as versionedfile57from .. import versionedfile as versionedfile
58from ..bzr.versionedfile import (58from ..versionedfile import (
59 ChunkedContentFactory,59 ChunkedContentFactory,
60 ConstantMapper,60 ConstantMapper,
61 HashEscapedPrefixMapper,61 HashEscapedPrefixMapper,
@@ -63,12 +63,12 @@
63 VirtualVersionedFiles,63 VirtualVersionedFiles,
64 make_versioned_files_factory,64 make_versioned_files_factory,
65 )65 )
66from ..bzr.weave import (66from ..weave import (
67 WeaveFile,67 WeaveFile,
68 WeaveInvalidChecksum,68 WeaveInvalidChecksum,
69 )69 )
70from ..bzr.weavefile import write_weave70from ..weavefile import write_weave
71from .scenarios import load_tests_apply_scenarios71from ...tests.scenarios import load_tests_apply_scenarios
7272
7373
74load_tests = load_tests_apply_scenarios74load_tests = load_tests_apply_scenarios
7575
=== renamed file 'breezy/tests/test__btree_serializer.py' => 'breezy/bzr/tests/test__btree_serializer.py'
--- breezy/tests/test__btree_serializer.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test__btree_serializer.py 2020-06-11 01:55:28 +0000
@@ -20,7 +20,7 @@
20import binascii20import binascii
21import bisect21import bisect
2222
23from .. import tests23from ... import tests
2424
25from .test_btree_index import compiled_btreeparser_feature25from .test_btree_index import compiled_btreeparser_feature
2626
2727
=== renamed file 'breezy/tests/test__chk_map.py' => 'breezy/bzr/tests/test__chk_map.py'
--- breezy/tests/test__chk_map.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test__chk_map.py 2020-06-11 01:55:28 +0000
@@ -16,13 +16,13 @@
1616
17"""Tests for _chk_map_*."""17"""Tests for _chk_map_*."""
1818
19from ... import (
20 tests,
21 )
19from .. import (22from .. import (
20 tests,
21 )
22from ..bzr import (
23 chk_map,23 chk_map,
24 )24 )
25from ..static_tuple import StaticTuple25from ...static_tuple import StaticTuple
26stuple = StaticTuple26stuple = StaticTuple
2727
2828
2929
=== renamed file 'breezy/tests/test__dirstate_helpers.py' => 'breezy/bzr/tests/test__dirstate_helpers.py'
--- breezy/tests/test__dirstate_helpers.py 2019-06-29 13:16:26 +0000
+++ breezy/bzr/tests/test__dirstate_helpers.py 2020-06-11 01:55:28 +0000
@@ -20,23 +20,23 @@
20import os20import os
21import time21import time
2222
23from .. import (23from ... import (
24 osutils,24 osutils,
25 tests,25 tests,
26 )26 )
27from ..bzr import (27from .. import (
28 dirstate,28 dirstate,
29 _dirstate_helpers_py,29 _dirstate_helpers_py,
30 )30 )
31from . import (31from . import (
32 test_dirstate,32 test_dirstate,
33 )33 )
34from .test_osutils import dir_reader_scenarios34from ...tests.test_osutils import dir_reader_scenarios
35from .scenarios import (35from ...tests.scenarios import (
36 load_tests_apply_scenarios,36 load_tests_apply_scenarios,
37 multiply_scenarios,37 multiply_scenarios,
38 )38 )
39from . import (39from ...tests import (
40 features,40 features,
41 )41 )
4242
@@ -227,7 +227,7 @@
227 """Run all Bisect Path tests against _bisect_path_left."""227 """Run all Bisect Path tests against _bisect_path_left."""
228228
229 def get_bisect_path(self):229 def get_bisect_path(self):
230 from breezy.bzr._dirstate_helpers_py import _bisect_path_left230 from .._dirstate_helpers_py import _bisect_path_left
231 return _bisect_path_left231 return _bisect_path_left
232232
233 def get_bisect(self):233 def get_bisect(self):
@@ -240,7 +240,7 @@
240 _test_needs_features = [compiled_dirstate_helpers_feature]240 _test_needs_features = [compiled_dirstate_helpers_feature]
241241
242 def get_bisect_path(self):242 def get_bisect_path(self):
243 from breezy.bzr._dirstate_helpers_pyx import _bisect_path_left243 from .._dirstate_helpers_pyx import _bisect_path_left
244 return _bisect_path_left244 return _bisect_path_left
245245
246246
@@ -248,7 +248,7 @@
248 """Run all Bisect Path tests against _bisect_path_right"""248 """Run all Bisect Path tests against _bisect_path_right"""
249249
250 def get_bisect_path(self):250 def get_bisect_path(self):
251 from breezy.bzr._dirstate_helpers_py import _bisect_path_right251 from .._dirstate_helpers_py import _bisect_path_right
252 return _bisect_path_right252 return _bisect_path_right
253253
254 def get_bisect(self):254 def get_bisect(self):
@@ -261,7 +261,7 @@
261 _test_needs_features = [compiled_dirstate_helpers_feature]261 _test_needs_features = [compiled_dirstate_helpers_feature]
262262
263 def get_bisect_path(self):263 def get_bisect_path(self):
264 from breezy.bzr._dirstate_helpers_pyx import _bisect_path_right264 from .._dirstate_helpers_pyx import _bisect_path_right
265 return _bisect_path_right265 return _bisect_path_right
266266
267267
@@ -279,7 +279,7 @@
279279
280 def get_bisect_dirblock(self):280 def get_bisect_dirblock(self):
281 """Return an implementation of bisect_dirblock"""281 """Return an implementation of bisect_dirblock"""
282 from breezy.bzr._dirstate_helpers_py import bisect_dirblock282 from .._dirstate_helpers_py import bisect_dirblock
283 return bisect_dirblock283 return bisect_dirblock
284284
285 def assertBisect(self, dirblocks, split_dirblocks, path, *args, **kwargs):285 def assertBisect(self, dirblocks, split_dirblocks, path, *args, **kwargs):
@@ -373,7 +373,7 @@
373 _test_needs_features = [compiled_dirstate_helpers_feature]373 _test_needs_features = [compiled_dirstate_helpers_feature]
374374
375 def get_bisect_dirblock(self):375 def get_bisect_dirblock(self):
376 from breezy.bzr._dirstate_helpers_pyx import bisect_dirblock376 from .._dirstate_helpers_pyx import bisect_dirblock
377 return bisect_dirblock377 return bisect_dirblock
378378
379379
@@ -389,7 +389,7 @@
389389
390 def get_lt_by_dirs(self):390 def get_lt_by_dirs(self):
391 """Get a specific implementation of lt_by_dirs."""391 """Get a specific implementation of lt_by_dirs."""
392 from ..bzr._dirstate_helpers_py import lt_by_dirs392 from .._dirstate_helpers_py import lt_by_dirs
393 return lt_by_dirs393 return lt_by_dirs
394394
395 def assertCmpByDirs(self, expected, str1, str2):395 def assertCmpByDirs(self, expected, str1, str2):
@@ -496,7 +496,7 @@
496 _test_needs_features = [compiled_dirstate_helpers_feature]496 _test_needs_features = [compiled_dirstate_helpers_feature]
497497
498 def get_lt_by_dirs(self):498 def get_lt_by_dirs(self):
499 from ..bzr._dirstate_helpers_pyx import lt_by_dirs499 from .._dirstate_helpers_pyx import lt_by_dirs
500 return lt_by_dirs500 return lt_by_dirs
501501
502502
@@ -512,7 +512,7 @@
512512
513 def get_lt_path_by_dirblock(self):513 def get_lt_path_by_dirblock(self):
514 """Get a specific implementation of _lt_path_by_dirblock."""514 """Get a specific implementation of _lt_path_by_dirblock."""
515 from ..bzr._dirstate_helpers_py import _lt_path_by_dirblock515 from .._dirstate_helpers_py import _lt_path_by_dirblock
516 return _lt_path_by_dirblock516 return _lt_path_by_dirblock
517517
518 def assertLtPathByDirblock(self, paths):518 def assertLtPathByDirblock(self, paths):
@@ -637,7 +637,7 @@
637 _test_needs_features = [compiled_dirstate_helpers_feature]637 _test_needs_features = [compiled_dirstate_helpers_feature]
638638
639 def get_lt_path_by_dirblock(self):639 def get_lt_path_by_dirblock(self):
640 from ..bzr._dirstate_helpers_pyx import _lt_path_by_dirblock640 from .._dirstate_helpers_pyx import _lt_path_by_dirblock
641 return _lt_path_by_dirblock641 return _lt_path_by_dirblock
642642
643643
@@ -647,7 +647,7 @@
647 _test_needs_features = [compiled_dirstate_helpers_feature]647 _test_needs_features = [compiled_dirstate_helpers_feature]
648648
649 def assertMemRChr(self, expected, s, c):649 def assertMemRChr(self, expected, s, c):
650 from breezy.bzr._dirstate_helpers_pyx import _py_memrchr650 from .._dirstate_helpers_pyx import _py_memrchr
651 self.assertEqual(expected, _py_memrchr(s, c))651 self.assertEqual(expected, _py_memrchr(s, c))
652652
653 def test_missing(self):653 def test_missing(self):
@@ -697,7 +697,7 @@
697 # inherits scenarios from test_dirstate697 # inherits scenarios from test_dirstate
698698
699 def get_read_dirblocks(self):699 def get_read_dirblocks(self):
700 from breezy.bzr._dirstate_helpers_py import _read_dirblocks700 from .._dirstate_helpers_py import _read_dirblocks
701 return _read_dirblocks701 return _read_dirblocks
702702
703 def test_smoketest(self):703 def test_smoketest(self):
@@ -737,7 +737,7 @@
737 _test_needs_features = [compiled_dirstate_helpers_feature]737 _test_needs_features = [compiled_dirstate_helpers_feature]
738738
739 def get_read_dirblocks(self):739 def get_read_dirblocks(self):
740 from breezy.bzr._dirstate_helpers_pyx import _read_dirblocks740 from .._dirstate_helpers_pyx import _read_dirblocks
741 return _read_dirblocks741 return _read_dirblocks
742742
743743
@@ -751,52 +751,52 @@
751751
752 def test_bisect_dirblock(self):752 def test_bisect_dirblock(self):
753 if compiled_dirstate_helpers_feature.available():753 if compiled_dirstate_helpers_feature.available():
754 from breezy.bzr._dirstate_helpers_pyx import bisect_dirblock754 from .._dirstate_helpers_pyx import bisect_dirblock
755 else:755 else:
756 from breezy.bzr._dirstate_helpers_py import bisect_dirblock756 from .._dirstate_helpers_py import bisect_dirblock
757 self.assertIs(bisect_dirblock, dirstate.bisect_dirblock)757 self.assertIs(bisect_dirblock, dirstate.bisect_dirblock)
758758
759 def test__bisect_path_left(self):759 def test__bisect_path_left(self):
760 if compiled_dirstate_helpers_feature.available():760 if compiled_dirstate_helpers_feature.available():
761 from breezy.bzr._dirstate_helpers_pyx import _bisect_path_left761 from .._dirstate_helpers_pyx import _bisect_path_left
762 else:762 else:
763 from breezy.bzr._dirstate_helpers_py import _bisect_path_left763 from .._dirstate_helpers_py import _bisect_path_left
764 self.assertIs(_bisect_path_left, dirstate._bisect_path_left)764 self.assertIs(_bisect_path_left, dirstate._bisect_path_left)
765765
766 def test__bisect_path_right(self):766 def test__bisect_path_right(self):
767 if compiled_dirstate_helpers_feature.available():767 if compiled_dirstate_helpers_feature.available():
768 from breezy.bzr._dirstate_helpers_pyx import _bisect_path_right768 from .._dirstate_helpers_pyx import _bisect_path_right
769 else:769 else:
770 from breezy.bzr._dirstate_helpers_py import _bisect_path_right770 from .._dirstate_helpers_py import _bisect_path_right
771 self.assertIs(_bisect_path_right, dirstate._bisect_path_right)771 self.assertIs(_bisect_path_right, dirstate._bisect_path_right)
772772
773 def test_lt_by_dirs(self):773 def test_lt_by_dirs(self):
774 if compiled_dirstate_helpers_feature.available():774 if compiled_dirstate_helpers_feature.available():
775 from ..bzr._dirstate_helpers_pyx import lt_by_dirs775 from .._dirstate_helpers_pyx import lt_by_dirs
776 else:776 else:
777 from ..bzr._dirstate_helpers_py import lt_by_dirs777 from .._dirstate_helpers_py import lt_by_dirs
778 self.assertIs(lt_by_dirs, dirstate.lt_by_dirs)778 self.assertIs(lt_by_dirs, dirstate.lt_by_dirs)
779779
780 def test__read_dirblocks(self):780 def test__read_dirblocks(self):
781 if compiled_dirstate_helpers_feature.available():781 if compiled_dirstate_helpers_feature.available():
782 from breezy.bzr._dirstate_helpers_pyx import _read_dirblocks782 from .._dirstate_helpers_pyx import _read_dirblocks
783 else:783 else:
784 from breezy.bzr._dirstate_helpers_py import _read_dirblocks784 from .._dirstate_helpers_py import _read_dirblocks
785 self.assertIs(_read_dirblocks, dirstate._read_dirblocks)785 self.assertIs(_read_dirblocks, dirstate._read_dirblocks)
786786
787 def test_update_entry(self):787 def test_update_entry(self):
788 if compiled_dirstate_helpers_feature.available():788 if compiled_dirstate_helpers_feature.available():
789 from breezy.bzr._dirstate_helpers_pyx import update_entry789 from .._dirstate_helpers_pyx import update_entry
790 else:790 else:
791 from breezy.bzr.dirstate import update_entry791 from ..dirstate import update_entry
792 self.assertIs(update_entry, dirstate.update_entry)792 self.assertIs(update_entry, dirstate.update_entry)
793793
794 def test_process_entry(self):794 def test_process_entry(self):
795 if compiled_dirstate_helpers_feature.available():795 if compiled_dirstate_helpers_feature.available():
796 from breezy.bzr._dirstate_helpers_pyx import ProcessEntryC796 from .._dirstate_helpers_pyx import ProcessEntryC
797 self.assertIs(ProcessEntryC, dirstate._process_entry)797 self.assertIs(ProcessEntryC, dirstate._process_entry)
798 else:798 else:
799 from breezy.bzr.dirstate import ProcessEntryPython799 from ..dirstate import ProcessEntryPython
800 self.assertIs(ProcessEntryPython, dirstate._process_entry)800 self.assertIs(ProcessEntryPython, dirstate._process_entry)
801801
802802
@@ -1313,7 +1313,7 @@
1313 raise RuntimeError('stop this')1313 raise RuntimeError('stop this')
1314 self.overrideAttr(dirstate, 'is_inside', is_inside_raises)1314 self.overrideAttr(dirstate, 'is_inside', is_inside_raises)
1315 try:1315 try:
1316 from breezy.bzr import _dirstate_helpers_pyx1316 from .. import _dirstate_helpers_pyx
1317 except ImportError:1317 except ImportError:
1318 pass1318 pass
1319 else:1319 else:
13201320
=== renamed file 'breezy/tests/test__groupcompress.py' => 'breezy/bzr/tests/test__groupcompress.py'
--- breezy/tests/test__groupcompress.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test__groupcompress.py 2020-06-11 01:55:28 +0000
@@ -18,16 +18,16 @@
1818
19import sys19import sys
2020
21from ... import (
22 tests,
23 )
21from .. import (24from .. import (
22 tests,
23 )
24from ..bzr import (
25 _groupcompress_py,25 _groupcompress_py,
26 )26 )
27from .scenarios import (27from ...tests.scenarios import (
28 load_tests_apply_scenarios,28 load_tests_apply_scenarios,
29 )29 )
30from . import (30from ...tests import (
31 features,31 features,
32 )32 )
3333
3434
=== renamed file 'breezy/tests/test_btree_index.py' => 'breezy/bzr/tests/test_btree_index.py'
--- breezy/tests/test_btree_index.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/test_btree_index.py 2020-06-11 01:55:28 +0000
@@ -20,7 +20,7 @@
20import pprint20import pprint
21import zlib21import zlib
2222
23from .. import (23from ... import (
24 errors,24 errors,
25 fifo_cache,25 fifo_cache,
26 lru_cache,26 lru_cache,
@@ -28,15 +28,15 @@
28 tests,28 tests,
29 transport,29 transport,
30 )30 )
31from ..bzr import (31from .. import (
32 btree_index,32 btree_index,
33 index as _mod_index,33 index as _mod_index,
34 )34 )
35from ..tests import (35from ...tests import (
36 TestCaseWithTransport,36 TestCaseWithTransport,
37 scenarios,37 scenarios,
38 )38 )
39from ..tests import (39from ...tests import (
40 features,40 features,
41 )41 )
4242
4343
=== renamed file 'breezy/tests/test_chk_map.py' => 'breezy/bzr/tests/test_chk_map.py'
--- breezy/tests/test_chk_map.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/test_chk_map.py 2020-06-11 01:55:28 +0000
@@ -16,22 +16,22 @@
1616
17"""Tests for maps built on a CHK versionedfiles facility."""17"""Tests for maps built on a CHK versionedfiles facility."""
1818
19from .. import (19from ... import (
20 errors,20 errors,
21 osutils,21 osutils,
22 tests,22 tests,
23 )23 )
24from ..bzr import (24from .. import (
25 chk_map,25 chk_map,
26 groupcompress,26 groupcompress,
27 )27 )
28from ..bzr.chk_map import (28from ..chk_map import (
29 CHKMap,29 CHKMap,
30 InternalNode,30 InternalNode,
31 LeafNode,31 LeafNode,
32 Node,32 Node,
33 )33 )
34from ..static_tuple import StaticTuple34from ...static_tuple import StaticTuple
3535
3636
37class TestNode(tests.TestCase):37class TestNode(tests.TestCase):
3838
=== renamed file 'breezy/tests/test_chk_serializer.py' => 'breezy/bzr/tests/test_chk_serializer.py'
--- breezy/tests/test_chk_serializer.py 2020-01-31 02:56:40 +0000
+++ breezy/bzr/tests/test_chk_serializer.py 2020-06-11 01:55:28 +0000
@@ -14,10 +14,10 @@
14# along with this program; if not, write to the Free Software14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
17from ..bzr.chk_serializer import (17from ..chk_serializer import (
18 chk_bencode_serializer,18 chk_bencode_serializer,
19 )19 )
20from ..revision import (20from ...revision import (
21 Revision,21 Revision,
22 )22 )
23from . import TestCase23from . import TestCase
2424
=== renamed file 'breezy/tests/test_dirstate.py' => 'breezy/bzr/tests/test_dirstate.py'
--- breezy/tests/test_dirstate.py 2020-01-11 02:39:17 +0000
+++ breezy/bzr/tests/test_dirstate.py 2020-06-11 01:55:28 +0000
@@ -19,7 +19,7 @@
19import os19import os
20import tempfile20import tempfile
2121
22from .. import (22from ... import (
23 controldir,23 controldir,
24 errors,24 errors,
25 memorytree,25 memorytree,
@@ -28,17 +28,17 @@
28 revisiontree,28 revisiontree,
29 tests,29 tests,
30 )30 )
31from ..bzr import (31from .. import (
32 dirstate,32 dirstate,
33 inventory,33 inventory,
34 inventorytree,34 inventorytree,
35 workingtree_4,35 workingtree_4,
36 )36 )
37from . import (37from ...tests import (
38 features,38 features,
39 test_osutils,39 test_osutils,
40 )40 )
41from .scenarios import load_tests_apply_scenarios41from ...tests.scenarios import load_tests_apply_scenarios
4242
4343
44# TODO:44# TODO:
4545
=== renamed file 'breezy/tests/test_generate_ids.py' => 'breezy/bzr/tests/test_generate_ids.py'
--- breezy/tests/test_generate_ids.py 2019-02-04 19:39:30 +0000
+++ breezy/bzr/tests/test_generate_ids.py 2020-06-11 01:55:28 +0000
@@ -16,10 +16,10 @@
1616
17"""Tests for breezy/generate_ids.py"""17"""Tests for breezy/generate_ids.py"""
1818
19from ... import (
20 tests,
21 )
19from .. import (22from .. import (
20 tests,
21 )
22from ..bzr import (
23 generate_ids,23 generate_ids,
24 )24 )
2525
2626
=== renamed file 'breezy/tests/test_groupcompress.py' => 'breezy/bzr/tests/test_groupcompress.py'
--- breezy/tests/test_groupcompress.py 2020-02-09 02:20:11 +0000
+++ breezy/bzr/tests/test_groupcompress.py 2020-06-11 01:55:28 +0000
@@ -18,23 +18,23 @@
1818
19import zlib19import zlib
2020
21from .. import (21from ... import (
22 config,22 config,
23 errors,23 errors,
24 osutils,24 osutils,
25 tests,25 tests,
26 trace,26 trace,
27 )27 )
28from ..bzr import (28from .. import (
29 btree_index,29 btree_index,
30 groupcompress,30 groupcompress,
31 knit,31 knit,
32 index as _mod_index,32 index as _mod_index,
33 versionedfile,33 versionedfile,
34 )34 )
35from ..osutils import sha_string35from ...osutils import sha_string
36from .test__groupcompress import compiled_groupcompress_feature36from .test__groupcompress import compiled_groupcompress_feature
37from .scenarios import load_tests_apply_scenarios37from ...tests.scenarios import load_tests_apply_scenarios
3838
3939
40def group_compress_implementation_scenarios():40def group_compress_implementation_scenarios():
4141
=== renamed file 'breezy/tests/test_index.py' => 'breezy/bzr/tests/test_index.py'
--- breezy/tests/test_index.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test_index.py 2020-06-11 01:55:28 +0000
@@ -16,12 +16,12 @@
1616
17"""Tests for indices."""17"""Tests for indices."""
1818
19from .. import (19from ... import (
20 errors,20 errors,
21 tests,21 tests,
22 transport,22 transport,
23 )23 )
24from ..bzr import (24from .. import (
25 index as _mod_index,25 index as _mod_index,
26 )26 )
2727
2828
=== renamed file 'breezy/tests/test_inv.py' => 'breezy/bzr/tests/test_inv.py'
--- breezy/tests/test_inv.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test_inv.py 2020-06-11 01:55:28 +0000
@@ -15,7 +15,7 @@
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
1717
18from .. import (18from ... import (
19 errors,19 errors,
20 osutils,20 osutils,
21 repository,21 repository,
@@ -23,12 +23,12 @@
23 tests,23 tests,
24 workingtree,24 workingtree,
25 )25 )
26from ..bzr import (26from .. import (
27 chk_map,27 chk_map,
28 groupcompress,28 groupcompress,
29 inventory,29 inventory,
30 )30 )
31from ..bzr.inventory import (31from ..inventory import (
32 CHKInventory,32 CHKInventory,
33 Inventory,33 Inventory,
34 ROOT_ID,34 ROOT_ID,
@@ -43,7 +43,7 @@
43 TestCase,43 TestCase,
44 TestCaseWithTransport,44 TestCaseWithTransport,
45 )45 )
46from .scenarios import load_tests_apply_scenarios46from ...tests.scenarios import load_tests_apply_scenarios
4747
4848
49load_tests = load_tests_apply_scenarios49load_tests = load_tests_apply_scenarios
5050
=== renamed file 'breezy/tests/test_inventory_delta.py' => 'breezy/bzr/tests/test_inventory_delta.py'
--- breezy/tests/test_inventory_delta.py 2020-02-13 23:57:28 +0000
+++ breezy/bzr/tests/test_inventory_delta.py 2020-06-11 01:55:28 +0000
@@ -22,14 +22,14 @@
22from io import (22from io import (
23 BytesIO,23 BytesIO,
24 )24 )
25from .. import osutils25from ... import osutils
26from ..bzr import (26from .. import (
27 inventory,27 inventory,
28 inventory_delta,28 inventory_delta,
29 )29 )
30from ..bzr.inventory_delta import InventoryDeltaError30from ..inventory_delta import InventoryDeltaError
31from ..bzr.inventory import Inventory31from ..inventory import Inventory
32from ..revision import NULL_REVISION32from ...revision import NULL_REVISION
33from . import TestCase33from . import TestCase
3434
35### DO NOT REFLOW THESE TEXTS. NEW LINES ARE SIGNIFICANT. ###35### DO NOT REFLOW THESE TEXTS. NEW LINES ARE SIGNIFICANT. ###
3636
=== renamed file 'breezy/tests/test_knit.py' => 'breezy/bzr/tests/test_knit.py'
--- breezy/tests/test_knit.py 2020-01-26 15:23:23 +0000
+++ breezy/bzr/tests/test_knit.py 2020-06-11 01:55:28 +0000
@@ -21,19 +21,19 @@
21from patiencediff import PatienceSequenceMatcher21from patiencediff import PatienceSequenceMatcher
22import sys22import sys
2323
24from .. import (24from ... import (
25 errors,25 errors,
26 multiparent,26 multiparent,
27 osutils,27 osutils,
28 tests,28 tests,
29 transport,29 transport,
30 )30 )
31from ..bzr import (31from .. import (
32 knit,32 knit,
33 pack,33 pack,
34 )34 )
35from ..bzr.index import *35from ..index import *
36from ..bzr.knit import (36from ..knit import (
37 AnnotatedKnitContent,37 AnnotatedKnitContent,
38 KnitContent,38 KnitContent,
39 KnitCorrupt,39 KnitCorrupt,
@@ -49,23 +49,23 @@
49 _KnitKeyAccess,49 _KnitKeyAccess,
50 make_file_factory,50 make_file_factory,
51 )51 )
52from ..bzr import (52from .. import (
53 knitpack_repo,53 knitpack_repo,
54 pack_repo,54 pack_repo,
55 )55 )
56from . import (56from ...tests import (
57 TestCase,57 TestCase,
58 TestCaseWithMemoryTransport,58 TestCaseWithMemoryTransport,
59 TestCaseWithTransport,59 TestCaseWithTransport,
60 TestNotApplicable,60 TestNotApplicable,
61 )61 )
62from ..bzr.versionedfile import (62from ..versionedfile import (
63 AbsentContentFactory,63 AbsentContentFactory,
64 ConstantMapper,64 ConstantMapper,
65 network_bytes_to_kind_and_offset,65 network_bytes_to_kind_and_offset,
66 RecordingVersionedFilesDecorator,66 RecordingVersionedFilesDecorator,
67 )67 )
68from . import (68from ...tests import (
69 features,69 features,
70 )70 )
7171
@@ -938,7 +938,7 @@
938938
939 @property939 @property
940 def _load_data(self):940 def _load_data(self):
941 from ..bzr._knit_load_data_py import _load_data_py941 from .._knit_load_data_py import _load_data_py
942 return _load_data_py942 return _load_data_py
943943
944 def get_knit_index(self, transport, name, mode):944 def get_knit_index(self, transport, name, mode):
@@ -1331,7 +1331,7 @@
13311331
1332 @property1332 @property
1333 def _load_data(self):1333 def _load_data(self):
1334 from ..bzr._knit_load_data_pyx import _load_data_c1334 from .._knit_load_data_pyx import _load_data_c
1335 return _load_data_c1335 return _load_data_c
13361336
13371337
13381338
=== added file 'breezy/bzr/tests/test_matchers.py'
--- breezy/bzr/tests/test_matchers.py 1970-01-01 00:00:00 +0000
+++ breezy/bzr/tests/test_matchers.py 2020-06-11 01:55:28 +0000
@@ -0,0 +1,57 @@
1# Copyright (C) 2010, 2011, 2012, 2016 Canonical Ltd
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
17"""Tests of breezy test matchers."""
18
19from testtools.matchers import *
20
21from ..smart.client import CallHookParams
22
23from ...tests import (
24 CapturedCall,
25 TestCase,
26 )
27from .matchers import *
28
29
30class TestContainsNoVfsCalls(TestCase):
31
32 def _make_call(self, method, args):
33 return CapturedCall(CallHookParams(method, args, None, None, None), 0)
34
35 def test__str__(self):
36 self.assertEqual("ContainsNoVfsCalls()", str(ContainsNoVfsCalls()))
37
38 def test_empty(self):
39 self.assertIs(None, ContainsNoVfsCalls().match([]))
40
41 def test_no_vfs_calls(self):
42 calls = [self._make_call("Branch.get_config_file", [])]
43 self.assertIs(None, ContainsNoVfsCalls().match(calls))
44
45 def test_ignores_unknown(self):
46 calls = [self._make_call("unknown", [])]
47 self.assertIs(None, ContainsNoVfsCalls().match(calls))
48
49 def test_match(self):
50 calls = [self._make_call(b"append", [b"file"]),
51 self._make_call(b"Branch.get_config_file", [])]
52 mismatch = ContainsNoVfsCalls().match(calls)
53 self.assertIsNot(None, mismatch)
54 self.assertEqual([calls[0].call], mismatch.vfs_calls)
55 self.assertIn(mismatch.describe(), [
56 "no VFS calls expected, got: b'append'(b'file')",
57 "no VFS calls expected, got: append('file')"])
058
=== renamed file 'breezy/tests/test_pack.py' => 'breezy/bzr/tests/test_pack.py'
--- breezy/tests/test_pack.py 2020-02-13 23:57:28 +0000
+++ breezy/bzr/tests/test_pack.py 2020-06-11 01:55:28 +0000
@@ -18,8 +18,8 @@
1818
19from io import BytesIO19from io import BytesIO
2020
21from .. import errors, tests21from ... import errors, tests
22from ..bzr import (22from .. import (
23 pack,23 pack,
24 )24 )
2525
2626
=== renamed file 'breezy/tests/test_remote.py' => 'breezy/bzr/tests/test_remote.py'
--- breezy/tests/test_remote.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test_remote.py 2020-06-11 01:55:28 +0000
@@ -29,7 +29,7 @@
29import tarfile29import tarfile
30import zlib30import zlib
3131
32from .. import (32from ... import (
33 bencode,33 bencode,
34 branch,34 branch,
35 config,35 config,
@@ -40,8 +40,8 @@
40 transport,40 transport,
41 treebuilder,41 treebuilder,
42 )42 )
43from ..branch import Branch43from ...branch import Branch
44from ..bzr import (44from .. import (
45 bzrdir,45 bzrdir,
46 inventory,46 inventory,
47 inventory_delta,47 inventory_delta,
@@ -49,15 +49,15 @@
49 versionedfile,49 versionedfile,
50 vf_search,50 vf_search,
51 )51 )
52from ..bzr.bzrdir import (52from ..bzrdir import (
53 BzrDir,53 BzrDir,
54 BzrDirFormat,54 BzrDirFormat,
55 )55 )
56from ..bzr import (56from .. import (
57 RemoteBzrProber,57 RemoteBzrProber,
58 )58 )
59from ..bzr.chk_serializer import chk_bencode_serializer59from ..chk_serializer import chk_bencode_serializer
60from ..bzr.remote import (60from ..remote import (
61 RemoteBranch,61 RemoteBranch,
62 RemoteBranchFormat,62 RemoteBranchFormat,
63 RemoteBzrDir,63 RemoteBzrDir,
@@ -65,24 +65,24 @@
65 RemoteRepository,65 RemoteRepository,
66 RemoteRepositoryFormat,66 RemoteRepositoryFormat,
67 )67 )
68from ..bzr import groupcompress_repo, knitpack_repo68from .. import groupcompress_repo, knitpack_repo
69from ..revision import (69from ...revision import (
70 NULL_REVISION,70 NULL_REVISION,
71 Revision,71 Revision,
72 )72 )
73from ..bzr.smart import medium, request73from ..smart import medium, request
74from ..bzr.smart.client import _SmartClient74from ..smart.client import _SmartClient
75from ..bzr.smart.repository import (75from ..smart.repository import (
76 SmartServerRepositoryGetParentMap,76 SmartServerRepositoryGetParentMap,
77 SmartServerRepositoryGetStream_1_19,77 SmartServerRepositoryGetStream_1_19,
78 _stream_to_byte_stream,78 _stream_to_byte_stream,
79 )79 )
80from . import (80from ...tests import (
81 test_server,81 test_server,
82 )82 )
83from .scenarios import load_tests_apply_scenarios83from ...tests.scenarios import load_tests_apply_scenarios
84from ..transport.memory import MemoryTransport84from ...transport.memory import MemoryTransport
85from ..transport.remote import (85from ...transport.remote import (
86 RemoteTransport,86 RemoteTransport,
87 RemoteSSHTransport,87 RemoteSSHTransport,
88 RemoteTCPTransport,88 RemoteTCPTransport,
8989
=== renamed file 'breezy/tests/test_repository.py' => 'breezy/bzr/tests/test_repository.py'
--- breezy/tests/test_repository.py 2020-01-30 16:13:31 +0000
+++ breezy/bzr/tests/test_repository.py 2020-06-11 01:55:28 +0000
@@ -213,7 +213,7 @@
213213
214 def test_register_extra_lazy(self):214 def test_register_extra_lazy(self):
215 self.assertEqual([], self.registry._get_all())215 self.assertEqual([], self.registry._get_all())
216 self.registry.register_extra_lazy("breezy.tests.test_repository",216 self.registry.register_extra_lazy(__name__,
217 "SampleExtraRepositoryFormat")217 "SampleExtraRepositoryFormat")
218 formats = self.registry._get_all()218 formats = self.registry._get_all()
219 self.assertEqual(1, len(formats))219 self.assertEqual(1, len(formats))
220220
=== renamed file 'breezy/tests/test_serializer.py' => 'breezy/bzr/tests/test_serializer.py'
--- breezy/tests/test_serializer.py 2017-06-10 21:59:15 +0000
+++ breezy/bzr/tests/test_serializer.py 2020-06-11 01:55:28 +0000
@@ -18,7 +18,7 @@
18"""Tests for the revision/inventory Serializers."""18"""Tests for the revision/inventory Serializers."""
1919
2020
21from ..bzr import (21from .. import (
22 chk_serializer,22 chk_serializer,
23 serializer,23 serializer,
24 xml5,24 xml5,
2525
=== renamed file 'breezy/tests/test_smart.py' => 'breezy/bzr/tests/test_smart.py'
=== renamed file 'breezy/tests/test_smart_request.py' => 'breezy/bzr/tests/test_smart_request.py'
=== renamed file 'breezy/tests/test_smart_signals.py' => 'breezy/bzr/tests/test_smart_signals.py'
=== renamed file 'breezy/tests/test_smart_transport.py' => 'breezy/bzr/tests/test_smart_transport.py'
--- breezy/tests/test_smart_transport.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test_smart_transport.py 2020-06-11 01:55:28 +0000
@@ -30,7 +30,7 @@
30from testtools.matchers import DocTestMatches30from testtools.matchers import DocTestMatches
3131
32import breezy32import breezy
33from .. import (33from ... import (
34 controldir,34 controldir,
35 debug,35 debug,
36 errors,36 errors,
@@ -39,10 +39,10 @@
39 transport as _mod_transport,39 transport as _mod_transport,
40 urlutils,40 urlutils,
41 )41 )
42from ..bzr import (42from .. import (
43 bzrdir,43 bzrdir,
44 )44 )
45from ..bzr.smart import (45from ..smart import (
46 client,46 client,
47 medium,47 medium,
48 message,48 message,
@@ -51,18 +51,20 @@
51 server as _mod_server,51 server as _mod_server,
52 vfs,52 vfs,
53 )53 )
54from . import (54from ...tests import (
55 features,55 features,
56 test_smart,
57 test_server,56 test_server,
58 )57 )
59from ..transport import (58from ...transport import (
60 http,59 http,
61 local,60 local,
62 memory,61 memory,
63 remote,62 remote,
64 ssh,63 ssh,
65 )64 )
65from . import (
66 test_smart,
67 )
6668
6769
68def create_file_pipes():70def create_file_pipes():
6971
=== added file 'breezy/bzr/tests/test_tag.py'
--- breezy/bzr/tests/test_tag.py 1970-01-01 00:00:00 +0000
+++ breezy/bzr/tests/test_tag.py 2020-06-11 01:55:28 +0000
@@ -0,0 +1,45 @@
1# Copyright (C) 2007, 2009-2012, 2016 Canonical Ltd
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
17"""Tests for breezy.bzr.tag."""
18
19
20from breezy.bzr.tag import (
21 BasicTags,
22 )
23from breezy.tests import (
24 TestCase,
25 )
26
27
28class TestTagSerialization(TestCase):
29
30 def test_tag_serialization(self):
31 """Test the precise representation of tag dicts."""
32 # Don't change this after we commit to this format, as it checks
33 # that the format is stable and compatible across releases.
34 #
35 # This release stores them in bencode as a dictionary from name to
36 # target.
37 store = BasicTags(branch=None)
38 td = dict(stable=b'stable-revid', boring=b'boring-revid')
39 packed = store._serialize_tag_dict(td)
40 expected = br'd6:boring12:boring-revid6:stable12:stable-revide'
41 self.assertEqualDiff(packed, expected)
42 self.assertEqual(store._deserialize_tag_dict(packed), td)
43
44
45
046
=== renamed file 'breezy/tests/test_testament.py' => 'breezy/bzr/tests/test_testament.py'
=== renamed file 'breezy/tests/test_versionedfile.py' => 'breezy/bzr/tests/test_versionedfile.py'
--- breezy/tests/test_versionedfile.py 2018-11-11 04:08:32 +0000
+++ breezy/bzr/tests/test_versionedfile.py 2020-06-11 01:55:28 +0000
@@ -16,12 +16,12 @@
1616
17"""Tests for VersionedFile classes"""17"""Tests for VersionedFile classes"""
1818
19from .. import (19from ... import (
20 errors,20 errors,
21 multiparent,21 multiparent,
22 tests,22 tests,
23 )23 )
24from ..bzr import (24from .. import (
25 groupcompress,25 groupcompress,
26 versionedfile,26 versionedfile,
27 )27 )
2828
=== renamed file 'breezy/tests/test_weave.py' => 'breezy/bzr/tests/test_weave.py'
--- breezy/tests/test_weave.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test_weave.py 2020-06-11 01:55:28 +0000
@@ -24,13 +24,13 @@
24from io import BytesIO24from io import BytesIO
25from pprint import pformat25from pprint import pformat
2626
27from .. import (27from ... import (
28 errors,28 errors,
29 )29 )
30from ..osutils import sha_string30from ...osutils import sha_string
31from . import TestCase, TestCaseInTempDir31from . import TestCase, TestCaseInTempDir
32from ..bzr.weave import Weave, WeaveFormatError, WeaveInvalidChecksum32from ..weave import Weave, WeaveFormatError, WeaveInvalidChecksum
33from ..bzr.weavefile import write_weave, read_weave33from ..weavefile import write_weave, read_weave
3434
3535
36# texts for use in testing36# texts for use in testing
3737
=== renamed file 'breezy/tests/test_workingtree_4.py' => 'breezy/bzr/tests/test_workingtree_4.py'
--- breezy/tests/test_workingtree_4.py 2019-09-21 23:05:12 +0000
+++ breezy/bzr/tests/test_workingtree_4.py 2020-06-11 01:55:28 +0000
@@ -20,19 +20,19 @@
20import os20import os
21import time21import time
2222
23from .. import (23from ... import (
24 errors,24 errors,
25 osutils,25 osutils,
26 )26 )
27from ..bzr import (27from .. import (
28 bzrdir,28 bzrdir,
29 dirstate,29 dirstate,
30 inventory,30 inventory,
31 workingtree_4,31 workingtree_4,
32 )32 )
33from ..lockdir import LockDir33from ...lockdir import LockDir
34from . import TestCaseWithTransport, TestSkipped, features34from ...tests import TestCaseWithTransport, TestSkipped, features
35from ..tree import InterTree35from ...tree import InterTree
3636
3737
38class TestWorkingTreeFormat4(TestCaseWithTransport):38class TestWorkingTreeFormat4(TestCaseWithTransport):
@@ -63,16 +63,10 @@
63 # Only the last unlock call will actually reset the63 # Only the last unlock call will actually reset the
64 # ignores. (bug #785671)64 # ignores. (bug #785671)
65 tree = self.make_workingtree()65 tree = self.make_workingtree()
66 tree.lock_read()66 with tree.lock_read():
67 try:67 with tree.lock_read():
68 tree.lock_read()
69 try:
70 tree.is_ignored("foo")68 tree.is_ignored("foo")
71 finally:
72 tree.unlock()
73 self.assertIsNot(None, tree._ignoreglobster)69 self.assertIsNot(None, tree._ignoreglobster)
74 finally:
75 tree.unlock()
76 self.assertIs(None, tree._ignoreglobster)70 self.assertIs(None, tree._ignoreglobster)
7771
78 def test_uses_lockdir(self):72 def test_uses_lockdir(self):
7973
=== renamed file 'breezy/tests/test_xml.py' => 'breezy/bzr/tests/test_xml.py'
--- breezy/tests/test_xml.py 2020-02-07 02:14:30 +0000
+++ breezy/bzr/tests/test_xml.py 2020-06-11 01:55:28 +0000
@@ -16,17 +16,17 @@
1616
17from io import BytesIO17from io import BytesIO
1818
19from .. import (19from ... import (
20 errors,20 errors,
21 fifo_cache,21 fifo_cache,
22 )22 )
23from ..bzr import (23from .. import (
24 inventory,24 inventory,
25 xml6,25 xml6,
26 xml7,26 xml7,
27 xml8,27 xml8,
28 )28 )
29from ..bzr.inventory import Inventory29from ..inventory import Inventory
30from . import TestCase30from . import TestCase
31import breezy.bzr.xml531import breezy.bzr.xml5
3232
3333
=== modified file 'breezy/bzr/workingtree_4.py'
--- breezy/bzr/workingtree_4.py 2020-02-18 01:57:45 +0000
+++ breezy/bzr/workingtree_4.py 2020-06-11 01:55:28 +0000
@@ -2201,7 +2201,7 @@
2201 @classmethod2201 @classmethod
2202 def make_source_parent_tree_compiled_dirstate(klass, test_case, source,2202 def make_source_parent_tree_compiled_dirstate(klass, test_case, source,
2203 target):2203 target):
2204 from ..tests.test__dirstate_helpers import \2204 from .tests.test__dirstate_helpers import \
2205 compiled_dirstate_helpers_feature2205 compiled_dirstate_helpers_feature
2206 test_case.requireFeature(compiled_dirstate_helpers_feature)2206 test_case.requireFeature(compiled_dirstate_helpers_feature)
2207 from ._dirstate_helpers_pyx import ProcessEntryC2207 from ._dirstate_helpers_pyx import ProcessEntryC
22082208
=== modified file 'breezy/git/mapping.py'
--- breezy/git/mapping.py 2020-05-06 02:13:25 +0000
+++ breezy/git/mapping.py 2020-06-11 01:55:28 +0000
@@ -114,6 +114,8 @@
114 if b"<" not in text and b">" not in text:114 if b"<" not in text and b">" not in text:
115 username = text115 username = text
116 email = text116 email = text
117 elif b">" not in text:
118 return text + b">"
117 else:119 else:
118 if text.rindex(b">") < text.rindex(b"<"):120 if text.rindex(b">") < text.rindex(b"<"):
119 raise ValueError(text)121 raise ValueError(text)
120122
=== modified file 'breezy/git/remote.py'
--- breezy/git/remote.py 2020-06-01 23:15:18 +0000
+++ breezy/git/remote.py 2020-06-11 01:55:28 +0000
@@ -222,11 +222,13 @@
222 return e222 return e
223 interesting_lines = [223 interesting_lines = [
224 line for line in stderr_lines224 line for line in stderr_lines
225 if line and line.replace('=', '')]225 if line and line.replace(b'=', b'')]
226 if len(interesting_lines) == 1:226 if len(interesting_lines) == 1:
227 interesting_line = interesting_lines[0]227 interesting_line = interesting_lines[0]
228 return parse_git_error(url, interesting_line)228 return parse_git_error(
229 return RemoteGitError('\n'.join(stderr_lines))229 url, interesting_line.decode('utf-8', 'surrogateescape'))
230 return RemoteGitError(
231 b'\n'.join(stderr_lines).decode('utf-8', 'surrogateescape'))
230232
231233
232class GitSmartTransport(Transport):234class GitSmartTransport(Transport):
233235
=== modified file 'breezy/git/tests/test_mapping.py'
--- breezy/git/tests/test_mapping.py 2020-02-18 01:57:45 +0000
+++ breezy/git/tests/test_mapping.py 2020-06-11 01:55:28 +0000
@@ -441,9 +441,14 @@
441 fix_person_identifier(b"bar@blah.nl"))441 fix_person_identifier(b"bar@blah.nl"))
442442
443 def test_fix(self):443 def test_fix(self):
444 self.assertEqual(b"person <bar@blah.nl>",444 self.assertEqual(
445 fix_person_identifier(b"somebody <person <bar@blah.nl>>"))445 b"person <bar@blah.nl>",
446 self.assertEqual(b"person <bar@blah.nl>",446 fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
447 fix_person_identifier(b"person<bar@blah.nl>"))447 self.assertEqual(
448 b"person <bar@blah.nl>",
449 fix_person_identifier(b"person<bar@blah.nl>"))
450 self.assertEqual(
451 b'Rohan Garg <rohangarg@kubuntu.org>',
452 fix_person_identifier(b'Rohan Garg <rohangarg@kubuntu.org'))
448 self.assertRaises(ValueError,453 self.assertRaises(ValueError,
449 fix_person_identifier, b"person >bar@blah.nl<")454 fix_person_identifier, b"person >bar@blah.nl<")
450455
=== modified file 'breezy/git/tests/test_remote.py'
--- breezy/git/tests/test_remote.py 2020-06-01 23:15:18 +0000
+++ breezy/git/tests/test_remote.py 2020-06-11 01:55:28 +0000
@@ -149,7 +149,7 @@
149 def setUp(self):149 def setUp(self):
150 super(ParseHangupTests, self).setUp()150 super(ParseHangupTests, self).setUp()
151 try:151 try:
152 HangupException(['foo'])152 HangupException([b'foo'])
153 except TypeError:153 except TypeError:
154 self.skipTest('dulwich version too old')154 self.skipTest('dulwich version too old')
155155
@@ -160,18 +160,18 @@
160 def test_single_line(self):160 def test_single_line(self):
161 self.assertEqual(161 self.assertEqual(
162 RemoteGitError('foo bar'),162 RemoteGitError('foo bar'),
163 parse_git_hangup('http://', HangupException(['foo bar'])))163 parse_git_hangup('http://', HangupException([b'foo bar'])))
164164
165 def test_multi_lines(self):165 def test_multi_lines(self):
166 self.assertEqual(166 self.assertEqual(
167 RemoteGitError('foo bar\nbla bla'),167 RemoteGitError('foo bar\nbla bla'),
168 parse_git_hangup(168 parse_git_hangup(
169 'http://', HangupException(['foo bar', 'bla bla'])))169 'http://', HangupException([b'foo bar', b'bla bla'])))
170170
171 def test_filter_boring(self):171 def test_filter_boring(self):
172 self.assertEqual(172 self.assertEqual(
173 RemoteGitError('foo bar'), parse_git_hangup('http://', HangupException(173 RemoteGitError('foo bar'), parse_git_hangup('http://', HangupException(
174 ['=======', 'foo bar', '======'])))174 [b'=======', b'foo bar', b'======'])))
175175
176 def test_permission_denied(self):176 def test_permission_denied(self):
177 self.assertEqual(177 self.assertEqual(
@@ -179,8 +179,8 @@
179 parse_git_hangup(179 parse_git_hangup(
180 'http://',180 'http://',
181 HangupException(181 HangupException(
182 ['=======',182 [b'=======',
183 'You are not allowed to push code to this project.', '', '======'])))183 b'You are not allowed to push code to this project.', b'', b'======'])))
184184
185185
186class TestRemoteGitBranchFormat(TestCase):186class TestRemoteGitBranchFormat(TestCase):
187187
=== modified file 'breezy/plugins/weave_fmt/repository.py'
--- breezy/plugins/weave_fmt/repository.py 2020-02-18 01:57:45 +0000
+++ breezy/plugins/weave_fmt/repository.py 2020-06-11 01:55:28 +0000
@@ -863,7 +863,7 @@
863 self.source._eliminate_revisions_not_present(863 self.source._eliminate_revisions_not_present(
864 required_revisions))864 required_revisions))
865 if limit is not None:865 if limit is not None:
866 topo_ordered = self.get_graph().iter_topo_order(result_set)866 topo_ordered = self.source.get_graph().iter_topo_order(result_set)
867 result_set = set(itertools.islice(topo_ordered, limit))867 result_set = set(itertools.islice(topo_ordered, limit))
868 return self.source.revision_ids_to_search_result(result_set)868 return self.source.revision_ids_to_search_result(result_set)
869869
870870
=== modified file 'breezy/tests/__init__.py'
--- breezy/tests/__init__.py 2020-02-18 01:57:45 +0000
+++ breezy/tests/__init__.py 2020-06-11 01:55:28 +0000
@@ -3962,6 +3962,41 @@
3962def _test_suite_testmod_names():3962def _test_suite_testmod_names():
3963 """Return the standard list of test module names to test."""3963 """Return the standard list of test module names to test."""
3964 return [3964 return [
3965 'breezy.bzr.tests.test_dirstate',
3966 'breezy.bzr.tests.per_bzrdir',
3967 'breezy.bzr.tests.per_inventory',
3968 'breezy.bzr.tests.per_pack_repository',
3969 'breezy.bzr.tests.per_repository_chk',
3970 'breezy.bzr.tests.per_repository_vf',
3971 'breezy.bzr.tests.per_versionedfile',
3972 'breezy.bzr.tests.test_groupcompress',
3973 'breezy.bzr.tests.test_btree_index',
3974 'breezy.bzr.tests.test_chk_map',
3975 'breezy.bzr.tests.test_chk_serializer',
3976 'breezy.bzr.tests.test_generate_ids',
3977 'breezy.bzr.tests.test_index',
3978 'breezy.bzr.tests.test_inv',
3979 'breezy.bzr.tests.test_inventory_delta',
3980 'breezy.bzr.tests.test_knit',
3981 'breezy.bzr.tests.test_matchers',
3982 'breezy.bzr.tests.test_pack',
3983 'breezy.bzr.tests.test_remote',
3984 'breezy.bzr.tests.test_repository',
3985 'breezy.bzr.tests.test_smart',
3986 'breezy.bzr.tests.test_smart_request',
3987 'breezy.bzr.tests.test_smart_signals',
3988 'breezy.bzr.tests.test_smart_transport',
3989 'breezy.bzr.tests.test_versionedfile',
3990 'breezy.bzr.tests.test_serializer',
3991 'breezy.bzr.tests.test_tag',
3992 'breezy.bzr.tests.test_testament',
3993 'breezy.bzr.tests.test_weave',
3994 'breezy.bzr.tests.test_workingtree_4',
3995 'breezy.bzr.tests.test_xml',
3996 'breezy.bzr.tests.test__btree_serializer',
3997 'breezy.bzr.tests.test__chk_map',
3998 'breezy.bzr.tests.test__dirstate_helpers',
3999 'breezy.bzr.tests.test__groupcompress',
3965 'breezy.git.tests.test_blackbox',4000 'breezy.git.tests.test_blackbox',
3966 'breezy.git.tests.test_builder',4001 'breezy.git.tests.test_builder',
3967 'breezy.git.tests.test_branch',4002 'breezy.git.tests.test_branch',
@@ -3987,34 +4022,23 @@
3987 'breezy.tests.blackbox',4022 'breezy.tests.blackbox',
3988 'breezy.tests.commands',4023 'breezy.tests.commands',
3989 'breezy.tests.per_branch',4024 'breezy.tests.per_branch',
3990 'breezy.tests.per_bzrdir',
3991 'breezy.tests.per_controldir',4025 'breezy.tests.per_controldir',
3992 'breezy.tests.per_controldir_colo',4026 'breezy.tests.per_controldir_colo',
3993 'breezy.tests.per_foreign_vcs',4027 'breezy.tests.per_foreign_vcs',
3994 'breezy.tests.per_interrepository',4028 'breezy.tests.per_interrepository',
3995 'breezy.tests.per_intertree',4029 'breezy.tests.per_intertree',
3996 'breezy.tests.per_inventory',
3997 'breezy.tests.per_interbranch',4030 'breezy.tests.per_interbranch',
3998 'breezy.tests.per_lock',4031 'breezy.tests.per_lock',
3999 'breezy.tests.per_merger',4032 'breezy.tests.per_merger',
4000 'breezy.tests.per_transport',4033 'breezy.tests.per_transport',
4001 'breezy.tests.per_tree',4034 'breezy.tests.per_tree',
4002 'breezy.tests.per_pack_repository',
4003 'breezy.tests.per_repository',4035 'breezy.tests.per_repository',
4004 'breezy.tests.per_repository_chk',
4005 'breezy.tests.per_repository_reference',4036 'breezy.tests.per_repository_reference',
4006 'breezy.tests.per_repository_vf',
4007 'breezy.tests.per_uifactory',4037 'breezy.tests.per_uifactory',
4008 'breezy.tests.per_versionedfile',
4009 'breezy.tests.per_workingtree',4038 'breezy.tests.per_workingtree',
4010 'breezy.tests.test__annotator',4039 'breezy.tests.test__annotator',
4011 'breezy.tests.test__bencode',4040 'breezy.tests.test__bencode',
4012 'breezy.tests.test__btree_serializer',
4013 'breezy.tests.test__chk_map',
4014 'breezy.tests.test__dirstate_helpers',
4015 'breezy.tests.test__groupcompress',
4016 'breezy.tests.test__known_graph',4041 'breezy.tests.test__known_graph',
4017 'breezy.tests.test__rio',
4018 'breezy.tests.test__simple_set',4042 'breezy.tests.test__simple_set',
4019 'breezy.tests.test__static_tuple',4043 'breezy.tests.test__static_tuple',
4020 'breezy.tests.test__walkdirs_win32',4044 'breezy.tests.test__walkdirs_win32',
@@ -4026,14 +4050,11 @@
4026 'breezy.tests.test_bisect_multi',4050 'breezy.tests.test_bisect_multi',
4027 'breezy.tests.test_branch',4051 'breezy.tests.test_branch',
4028 'breezy.tests.test_branchbuilder',4052 'breezy.tests.test_branchbuilder',
4029 'breezy.tests.test_btree_index',
4030 'breezy.tests.test_bugtracker',4053 'breezy.tests.test_bugtracker',
4031 'breezy.tests.test_bundle',4054 'breezy.tests.test_bundle',
4032 'breezy.tests.test_bzrdir',4055 'breezy.tests.test_bzrdir',
4033 'breezy.tests.test__chunks_to_lines',4056 'breezy.tests.test__chunks_to_lines',
4034 'breezy.tests.test_cache_utf8',4057 'breezy.tests.test_cache_utf8',
4035 'breezy.tests.test_chk_map',
4036 'breezy.tests.test_chk_serializer',
4037 'breezy.tests.test_chunk_writer',4058 'breezy.tests.test_chunk_writer',
4038 'breezy.tests.test_clean_tree',4059 'breezy.tests.test_clean_tree',
4039 'breezy.tests.test_cmdline',4060 'breezy.tests.test_cmdline',
@@ -4051,7 +4072,6 @@
4051 'breezy.tests.test_debug',4072 'breezy.tests.test_debug',
4052 'breezy.tests.test_diff',4073 'breezy.tests.test_diff',
4053 'breezy.tests.test_directory_service',4074 'breezy.tests.test_directory_service',
4054 'breezy.tests.test_dirstate',
4055 'breezy.tests.test_email_message',4075 'breezy.tests.test_email_message',
4056 'breezy.tests.test_eol_filters',4076 'breezy.tests.test_eol_filters',
4057 'breezy.tests.test_errors',4077 'breezy.tests.test_errors',
@@ -4068,12 +4088,10 @@
4068 'breezy.tests.test_filter_tree',4088 'breezy.tests.test_filter_tree',
4069 'breezy.tests.test_foreign',4089 'breezy.tests.test_foreign',
4070 'breezy.tests.test_generate_docs',4090 'breezy.tests.test_generate_docs',
4071 'breezy.tests.test_generate_ids',
4072 'breezy.tests.test_globbing',4091 'breezy.tests.test_globbing',
4073 'breezy.tests.test_gpg',4092 'breezy.tests.test_gpg',
4074 'breezy.tests.test_graph',4093 'breezy.tests.test_graph',
4075 'breezy.tests.test_grep',4094 'breezy.tests.test_grep',
4076 'breezy.tests.test_groupcompress',
4077 'breezy.tests.test_hashcache',4095 'breezy.tests.test_hashcache',
4078 'breezy.tests.test_help',4096 'breezy.tests.test_help',
4079 'breezy.tests.test_hooks',4097 'breezy.tests.test_hooks',
@@ -4084,12 +4102,8 @@
4084 'breezy.tests.test_i18n',4102 'breezy.tests.test_i18n',
4085 'breezy.tests.test_identitymap',4103 'breezy.tests.test_identitymap',
4086 'breezy.tests.test_ignores',4104 'breezy.tests.test_ignores',
4087 'breezy.tests.test_index',
4088 'breezy.tests.test_import_tariff',4105 'breezy.tests.test_import_tariff',
4089 'breezy.tests.test_info',4106 'breezy.tests.test_info',
4090 'breezy.tests.test_inv',
4091 'breezy.tests.test_inventory_delta',
4092 'breezy.tests.test_knit',
4093 'breezy.tests.test_lazy_import',4107 'breezy.tests.test_lazy_import',
4094 'breezy.tests.test_lazy_regex',4108 'breezy.tests.test_lazy_regex',
4095 'breezy.tests.test_library_state',4109 'breezy.tests.test_library_state',
@@ -4118,7 +4132,6 @@
4118 'breezy.tests.test_options',4132 'breezy.tests.test_options',
4119 'breezy.tests.test_osutils',4133 'breezy.tests.test_osutils',
4120 'breezy.tests.test_osutils_encodings',4134 'breezy.tests.test_osutils_encodings',
4121 'breezy.tests.test_pack',
4122 'breezy.tests.test_patch',4135 'breezy.tests.test_patch',
4123 'breezy.tests.test_patches',4136 'breezy.tests.test_patches',
4124 'breezy.tests.test_permissions',4137 'breezy.tests.test_permissions',
@@ -4130,30 +4143,24 @@
4130 'breezy.tests.test_reconcile',4143 'breezy.tests.test_reconcile',
4131 'breezy.tests.test_reconfigure',4144 'breezy.tests.test_reconfigure',
4132 'breezy.tests.test_registry',4145 'breezy.tests.test_registry',
4133 'breezy.tests.test_remote',
4134 'breezy.tests.test_rename_map',4146 'breezy.tests.test_rename_map',
4135 'breezy.tests.test_repository',
4136 'breezy.tests.test_revert',4147 'breezy.tests.test_revert',
4137 'breezy.tests.test_revision',4148 'breezy.tests.test_revision',
4138 'breezy.tests.test_revisionspec',4149 'breezy.tests.test_revisionspec',
4139 'breezy.tests.test_revisiontree',4150 'breezy.tests.test_revisiontree',
4140 'breezy.tests.test_rio',4151 'breezy.tests.test_rio',
4152 'breezy.tests.test__rio',
4141 'breezy.tests.test_rules',4153 'breezy.tests.test_rules',
4142 'breezy.tests.test_url_policy_open',4154 'breezy.tests.test_url_policy_open',
4143 'breezy.tests.test_sampler',4155 'breezy.tests.test_sampler',
4144 'breezy.tests.test_scenarios',4156 'breezy.tests.test_scenarios',
4145 'breezy.tests.test_script',4157 'breezy.tests.test_script',
4146 'breezy.tests.test_selftest',4158 'breezy.tests.test_selftest',
4147 'breezy.tests.test_serializer',
4148 'breezy.tests.test_setup',4159 'breezy.tests.test_setup',
4149 'breezy.tests.test_sftp_transport',4160 'breezy.tests.test_sftp_transport',
4150 'breezy.tests.test_shelf',4161 'breezy.tests.test_shelf',
4151 'breezy.tests.test_shelf_ui',4162 'breezy.tests.test_shelf_ui',
4152 'breezy.tests.test_smart',
4153 'breezy.tests.test_smart_add',4163 'breezy.tests.test_smart_add',
4154 'breezy.tests.test_smart_request',
4155 'breezy.tests.test_smart_signals',
4156 'breezy.tests.test_smart_transport',
4157 'breezy.tests.test_smtp_connection',4164 'breezy.tests.test_smtp_connection',
4158 'breezy.tests.test_source',4165 'breezy.tests.test_source',
4159 'breezy.tests.test_ssh_transport',4166 'breezy.tests.test_ssh_transport',
@@ -4164,7 +4171,6 @@
4164 'breezy.tests.test_symbol_versioning',4171 'breezy.tests.test_symbol_versioning',
4165 'breezy.tests.test_tag',4172 'breezy.tests.test_tag',
4166 'breezy.tests.test_test_server',4173 'breezy.tests.test_test_server',
4167 'breezy.tests.test_testament',
4168 'breezy.tests.test_textfile',4174 'breezy.tests.test_textfile',
4169 'breezy.tests.test_textmerge',4175 'breezy.tests.test_textmerge',
4170 'breezy.tests.test_cethread',4176 'breezy.tests.test_cethread',
@@ -4188,16 +4194,12 @@
4188 'breezy.tests.test_utextwrap',4194 'breezy.tests.test_utextwrap',
4189 'breezy.tests.test_version',4195 'breezy.tests.test_version',
4190 'breezy.tests.test_version_info',4196 'breezy.tests.test_version_info',
4191 'breezy.tests.test_versionedfile',
4192 'breezy.tests.test_vf_search',4197 'breezy.tests.test_vf_search',
4193 'breezy.tests.test_views',4198 'breezy.tests.test_views',
4194 'breezy.tests.test_weave',
4195 'breezy.tests.test_whitebox',4199 'breezy.tests.test_whitebox',
4196 'breezy.tests.test_win32utils',4200 'breezy.tests.test_win32utils',
4197 'breezy.tests.test_workingtree',4201 'breezy.tests.test_workingtree',
4198 'breezy.tests.test_workingtree_4',
4199 'breezy.tests.test_wsgi',4202 'breezy.tests.test_wsgi',
4200 'breezy.tests.test_xml',
4201 ]4203 ]
42024204
42034205
42044206
=== modified file 'breezy/tests/blackbox/test_annotate.py'
--- breezy/tests/blackbox/test_annotate.py 2019-06-16 17:36:59 +0000
+++ breezy/tests/blackbox/test_annotate.py 2020-06-11 01:55:28 +0000
@@ -29,7 +29,7 @@
29 tests,29 tests,
30 )30 )
3131
32from breezy.tests.matchers import ContainsNoVfsCalls32from breezy.bzr.tests.matchers import ContainsNoVfsCalls
33from breezy.urlutils import joinpath33from breezy.urlutils import joinpath
3434
35from ..test_bedding import override_whoami35from ..test_bedding import override_whoami
3636
=== modified file 'breezy/tests/blackbox/test_branch.py'
--- breezy/tests/blackbox/test_branch.py 2020-04-02 01:37:43 +0000
+++ breezy/tests/blackbox/test_branch.py 2020-06-11 01:55:28 +0000
@@ -38,7 +38,7 @@
38 HardlinkFeature,38 HardlinkFeature,
39 )39 )
40from breezy.tests.blackbox import test_switch40from breezy.tests.blackbox import test_switch
41from breezy.tests.matchers import ContainsNoVfsCalls41from breezy.bzr.tests.matchers import ContainsNoVfsCalls
42from breezy.tests.test_sftp_transport import TestCaseWithSFTPServer42from breezy.tests.test_sftp_transport import TestCaseWithSFTPServer
43from breezy.tests.script import run_script43from breezy.tests.script import run_script
44from breezy.urlutils import local_path_to_url, strip_trailing_slash44from breezy.urlutils import local_path_to_url, strip_trailing_slash
4545
=== modified file 'breezy/tests/blackbox/test_break_lock.py'
--- breezy/tests/blackbox/test_break_lock.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_break_lock.py 2020-06-11 01:55:28 +0000
@@ -24,7 +24,7 @@
24 osutils,24 osutils,
25 tests,25 tests,
26 )26 )
27from breezy.tests.matchers import ContainsNoVfsCalls27from breezy.bzr.tests.matchers import ContainsNoVfsCalls
28from breezy.tests.script import (28from breezy.tests.script import (
29 run_script,29 run_script,
30 )30 )
3131
=== modified file 'breezy/tests/blackbox/test_cat.py'
--- breezy/tests/blackbox/test_cat.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_cat.py 2020-06-11 01:55:28 +0000
@@ -19,7 +19,7 @@
19"""19"""
2020
21from ... import tests21from ... import tests
22from ..matchers import ContainsNoVfsCalls22from ...bzr.tests.matchers import ContainsNoVfsCalls
23from ...transport import memory23from ...transport import memory
2424
2525
2626
=== modified file 'breezy/tests/blackbox/test_checkout.py'
--- breezy/tests/blackbox/test_checkout.py 2020-01-19 13:07:15 +0000
+++ breezy/tests/blackbox/test_checkout.py 2020-06-11 01:55:28 +0000
@@ -30,7 +30,7 @@
30from breezy.tests import (30from breezy.tests import (
31 TestCaseWithTransport,31 TestCaseWithTransport,
32 )32 )
33from breezy.tests.matchers import ContainsNoVfsCalls33from breezy.bzr.tests.matchers import ContainsNoVfsCalls
34from breezy.tests.features import (34from breezy.tests.features import (
35 HardlinkFeature,35 HardlinkFeature,
36 )36 )
3737
=== modified file 'breezy/tests/blackbox/test_commit.py'
--- breezy/tests/blackbox/test_commit.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/blackbox/test_commit.py 2020-06-11 01:55:28 +0000
@@ -36,7 +36,7 @@
36 features,36 features,
37 )37 )
38from .. import TestCaseWithTransport38from .. import TestCaseWithTransport
39from ..matchers import ContainsNoVfsCalls39from ...bzr.tests.matchers import ContainsNoVfsCalls
40from ..test_bedding import override_whoami40from ..test_bedding import override_whoami
4141
4242
4343
=== modified file 'breezy/tests/blackbox/test_config.py'
--- breezy/tests/blackbox/test_config.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_config.py 2020-06-11 01:55:28 +0000
@@ -25,7 +25,7 @@
25 script,25 script,
26 test_config as _t_config,26 test_config as _t_config,
27 )27 )
28from ..matchers import ContainsNoVfsCalls28from ...bzr.tests.matchers import ContainsNoVfsCalls
2929
3030
31class TestWithoutConfig(tests.TestCaseWithTransport):31class TestWithoutConfig(tests.TestCaseWithTransport):
3232
=== modified file 'breezy/tests/blackbox/test_export.py'
--- breezy/tests/blackbox/test_export.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/blackbox/test_export.py 2020-06-11 01:55:28 +0000
@@ -35,7 +35,7 @@
35 features,35 features,
36 TestCaseWithTransport,36 TestCaseWithTransport,
37 )37 )
38from ..matchers import ContainsNoVfsCalls38from ...bzr.tests.matchers import ContainsNoVfsCalls
3939
4040
41class TestExport(TestCaseWithTransport):41class TestExport(TestCaseWithTransport):
4242
=== modified file 'breezy/tests/blackbox/test_info.py'
--- breezy/tests/blackbox/test_info.py 2019-09-21 19:27:04 +0000
+++ breezy/tests/blackbox/test_info.py 2020-06-11 01:55:28 +0000
@@ -33,7 +33,7 @@
33from breezy.bzr import (33from breezy.bzr import (
34 bzrdir,34 bzrdir,
35 )35 )
36from breezy.tests.matchers import ContainsNoVfsCalls36from breezy.bzr.tests.matchers import ContainsNoVfsCalls
37from breezy.transport import memory37from breezy.transport import memory
3838
3939
4040
=== modified file 'breezy/tests/blackbox/test_log.py'
--- breezy/tests/blackbox/test_log.py 2020-02-18 01:57:45 +0000
+++ breezy/tests/blackbox/test_log.py 2020-06-11 01:55:28 +0000
@@ -31,7 +31,7 @@
31 test_log,31 test_log,
32 features,32 features,
33 )33 )
34from breezy.tests.matchers import ContainsNoVfsCalls34from breezy.bzr.tests.matchers import ContainsNoVfsCalls
3535
3636
37class TestLog(tests.TestCaseWithTransport, test_log.TestLogMixin):37class TestLog(tests.TestCaseWithTransport, test_log.TestLogMixin):
3838
=== modified file 'breezy/tests/blackbox/test_ls.py'
--- breezy/tests/blackbox/test_ls.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_ls.py 2020-06-11 01:55:28 +0000
@@ -20,7 +20,7 @@
20 ignores,20 ignores,
21 tests,21 tests,
22 )22 )
23from breezy.tests.matchers import ContainsNoVfsCalls23from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2424
2525
26class TestLS(tests.TestCaseWithTransport):26class TestLS(tests.TestCaseWithTransport):
2727
=== modified file 'breezy/tests/blackbox/test_pack.py'
--- breezy/tests/blackbox/test_pack.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_pack.py 2020-06-11 01:55:28 +0000
@@ -19,7 +19,7 @@
19import os19import os
2020
21from breezy import tests21from breezy import tests
22from breezy.tests.matchers import ContainsNoVfsCalls22from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2323
2424
25class TestPack(tests.TestCaseWithTransport):25class TestPack(tests.TestCaseWithTransport):
2626
=== modified file 'breezy/tests/blackbox/test_push.py'
--- breezy/tests/blackbox/test_push.py 2019-09-01 15:33:59 +0000
+++ breezy/tests/blackbox/test_push.py 2020-06-11 01:55:28 +0000
@@ -41,7 +41,7 @@
41 script,41 script,
42 test_foreign,42 test_foreign,
43 )43 )
44from breezy.tests.matchers import ContainsNoVfsCalls44from breezy.bzr.tests.matchers import ContainsNoVfsCalls
45from breezy.transport import memory45from breezy.transport import memory
4646
4747
4848
=== modified file 'breezy/tests/blackbox/test_reconcile.py'
--- breezy/tests/blackbox/test_reconcile.py 2019-05-29 03:22:34 +0000
+++ breezy/tests/blackbox/test_reconcile.py 2020-06-11 01:55:28 +0000
@@ -25,7 +25,7 @@
25from breezy.bzr import (25from breezy.bzr import (
26 inventory,26 inventory,
27 )27 )
28from breezy.tests.matchers import ContainsNoVfsCalls28from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2929
3030
31class TrivialTest(tests.TestCaseWithTransport):31class TrivialTest(tests.TestCaseWithTransport):
3232
=== modified file 'breezy/tests/blackbox/test_revno.py'
--- breezy/tests/blackbox/test_revno.py 2018-11-16 11:37:47 +0000
+++ breezy/tests/blackbox/test_revno.py 2020-06-11 01:55:28 +0000
@@ -22,7 +22,7 @@
2222
23from breezy import tests23from breezy import tests
24from breezy.errors import NoSuchRevision24from breezy.errors import NoSuchRevision
25from breezy.tests.matchers import ContainsNoVfsCalls25from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2626
2727
28class TestRevno(tests.TestCaseWithTransport):28class TestRevno(tests.TestCaseWithTransport):
2929
=== modified file 'breezy/tests/blackbox/test_rmbranch.py'
--- breezy/tests/blackbox/test_rmbranch.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_rmbranch.py 2020-06-11 01:55:28 +0000
@@ -23,7 +23,7 @@
23from breezy.tests import (23from breezy.tests import (
24 TestCaseWithTransport,24 TestCaseWithTransport,
25 )25 )
26from breezy.tests.matchers import ContainsNoVfsCalls26from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2727
2828
29class TestRemoveBranch(TestCaseWithTransport):29class TestRemoveBranch(TestCaseWithTransport):
3030
=== modified file 'breezy/tests/blackbox/test_send.py'
--- breezy/tests/blackbox/test_send.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/blackbox/test_send.py 2020-06-11 01:55:28 +0000
@@ -30,7 +30,7 @@
30from .. import (30from .. import (
31 scenarios,31 scenarios,
32 )32 )
33from ..matchers import ContainsNoVfsCalls33from ...bzr.tests.matchers import ContainsNoVfsCalls
3434
3535
36load_tests = scenarios.load_tests_apply_scenarios36load_tests = scenarios.load_tests_apply_scenarios
3737
=== modified file 'breezy/tests/blackbox/test_shared_repository.py'
--- breezy/tests/blackbox/test_shared_repository.py 2019-09-01 15:33:59 +0000
+++ breezy/tests/blackbox/test_shared_repository.py 2020-06-11 01:55:28 +0000
@@ -22,7 +22,7 @@
22from breezy.controldir import ControlDir22from breezy.controldir import ControlDir
23import breezy.errors as errors23import breezy.errors as errors
24from breezy.tests import TestCaseInTempDir24from breezy.tests import TestCaseInTempDir
25from breezy.tests.matchers import ContainsNoVfsCalls25from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2626
2727
28class TestSharedRepo(TestCaseInTempDir):28class TestSharedRepo(TestCaseInTempDir):
2929
=== modified file 'breezy/tests/blackbox/test_sign_my_commits.py'
--- breezy/tests/blackbox/test_sign_my_commits.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_sign_my_commits.py 2020-06-11 01:55:28 +0000
@@ -21,7 +21,7 @@
21 gpg,21 gpg,
22 tests,22 tests,
23 )23 )
24from breezy.tests.matchers import ContainsNoVfsCalls24from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2525
2626
27class SignMyCommits(tests.TestCaseWithTransport):27class SignMyCommits(tests.TestCaseWithTransport):
2828
=== modified file 'breezy/tests/blackbox/test_switch.py'
--- breezy/tests/blackbox/test_switch.py 2020-03-22 18:52:18 +0000
+++ breezy/tests/blackbox/test_switch.py 2020-06-11 01:55:28 +0000
@@ -34,7 +34,7 @@
34from breezy.tests.features import UnicodeFilenameFeature34from breezy.tests.features import UnicodeFilenameFeature
35from breezy.directory_service import directories35from breezy.directory_service import directories
3636
37from breezy.tests.matchers import ContainsNoVfsCalls37from breezy.bzr.tests.matchers import ContainsNoVfsCalls
3838
3939
40class TestSwitch(TestCaseWithTransport):40class TestSwitch(TestCaseWithTransport):
4141
=== modified file 'breezy/tests/blackbox/test_tags.py'
--- breezy/tests/blackbox/test_tags.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/blackbox/test_tags.py 2020-06-11 01:55:28 +0000
@@ -35,7 +35,7 @@
35 script,35 script,
36 TestCaseWithTransport,36 TestCaseWithTransport,
37 )37 )
38from breezy.tests.matchers import ContainsNoVfsCalls38from breezy.bzr.tests.matchers import ContainsNoVfsCalls
39from breezy.workingtree import WorkingTree39from breezy.workingtree import WorkingTree
4040
4141
4242
=== modified file 'breezy/tests/blackbox/test_testament.py'
--- breezy/tests/blackbox/test_testament.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/blackbox/test_testament.py 2020-06-11 01:55:28 +0000
@@ -18,7 +18,7 @@
1818
19import re19import re
2020
21from breezy.tests.test_testament import (21from breezy.bzr.tests.test_testament import (
22 osutils,22 osutils,
23 REV_1_SHORT,23 REV_1_SHORT,
24 REV_1_SHORT_STRICT,24 REV_1_SHORT_STRICT,
2525
=== modified file 'breezy/tests/blackbox/test_uncommit.py'
--- breezy/tests/blackbox/test_uncommit.py 2019-02-16 17:54:34 +0000
+++ breezy/tests/blackbox/test_uncommit.py 2020-06-11 01:55:28 +0000
@@ -22,7 +22,7 @@
22from breezy.bzr.bzrdir import BzrDirMetaFormat122from breezy.bzr.bzrdir import BzrDirMetaFormat1
23from breezy.errors import BoundBranchOutOfDate23from breezy.errors import BoundBranchOutOfDate
24from breezy.tests import TestCaseWithTransport24from breezy.tests import TestCaseWithTransport
25from breezy.tests.matchers import ContainsNoVfsCalls25from breezy.bzr.tests.matchers import ContainsNoVfsCalls
26from breezy.tests.script import (26from breezy.tests.script import (
27 run_script,27 run_script,
28 ScriptRunner,28 ScriptRunner,
2929
=== modified file 'breezy/tests/blackbox/test_verify_signatures.py'
--- breezy/tests/blackbox/test_verify_signatures.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/blackbox/test_verify_signatures.py 2020-06-11 01:55:28 +0000
@@ -21,7 +21,7 @@
21 gpg,21 gpg,
22 tests,22 tests,
23 )23 )
24from breezy.tests.matchers import ContainsNoVfsCalls24from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2525
2626
27class TestVerifySignatures(tests.TestCaseWithTransport):27class TestVerifySignatures(tests.TestCaseWithTransport):
2828
=== modified file 'breezy/tests/matchers.py'
--- breezy/tests/matchers.py 2020-02-13 23:57:28 +0000
+++ breezy/tests/matchers.py 2020-06-11 01:55:28 +0000
@@ -30,7 +30,6 @@
30 'HasLayout',30 'HasLayout',
31 'HasPathRelations',31 'HasPathRelations',
32 'MatchesAncestry',32 'MatchesAncestry',
33 'ContainsNoVfsCalls',
34 'ReturnsUnlockable',33 'ReturnsUnlockable',
35 'RevisionHistoryMatches',34 'RevisionHistoryMatches',
36 ]35 ]
@@ -39,16 +38,8 @@
39 osutils,38 osutils,
40 revision as _mod_revision,39 revision as _mod_revision,
41 )40 )
42from .. import lazy_import41
43lazy_import.lazy_import(globals(),42from ..tree import InterTree
44 """
45from breezy.bzr.smart.request import request_handlers as smart_request_handlers
46from breezy.bzr.smart import vfs
47""")
48from ..tree import (
49 find_previous_path,
50 InterTree,
51 )
5243
53from testtools.matchers import Equals, Mismatch, Matcher44from testtools.matchers import Equals, Mismatch, Matcher
5445
@@ -278,37 +269,3 @@
278 branch.last_revision(), [_mod_revision.NULL_REVISION]))269 branch.last_revision(), [_mod_revision.NULL_REVISION]))
279 history.reverse()270 history.reverse()
280 return Equals(self.expected).match(history)271 return Equals(self.expected).match(history)
281
282
283class _NoVfsCallsMismatch(Mismatch):
284 """Mismatch describing a list of HPSS calls which includes VFS requests."""
285
286 def __init__(self, vfs_calls):
287 self.vfs_calls = vfs_calls
288
289 def describe(self):
290 return "no VFS calls expected, got: %s" % ",".join([
291 "%s(%s)" % (c.method,
292 ", ".join([repr(a) for a in c.args])) for c in self.vfs_calls])
293
294
295class ContainsNoVfsCalls(Matcher):
296 """Ensure that none of the specified calls are HPSS calls."""
297
298 def __str__(self):
299 return 'ContainsNoVfsCalls()'
300
301 @classmethod
302 def match(cls, hpss_calls):
303 vfs_calls = []
304 for call in hpss_calls:
305 try:
306 request_method = smart_request_handlers.get(call.call.method)
307 except KeyError:
308 # A method we don't know about doesn't count as a VFS method.
309 continue
310 if issubclass(request_method, vfs.VfsRequest):
311 vfs_calls.append(call.call)
312 if len(vfs_calls) == 0:
313 return None
314 return _NoVfsCallsMismatch(vfs_calls)
315272
=== modified file 'breezy/tests/per_branch/test_branch.py'
--- breezy/tests/per_branch/test_branch.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/per_branch/test_branch.py 2020-06-11 01:55:28 +0000
@@ -37,7 +37,6 @@
37 tree as _mod_tree,37 tree as _mod_tree,
38 )38 )
39from breezy.bzr import (39from breezy.bzr import (
40 branch as _mod_bzrbranch,
41 remote,40 remote,
42 )41 )
43from breezy.tests import (42from breezy.tests import (
@@ -257,7 +256,7 @@
257 """256 """
258 t = self.get_transport()257 t = self.get_transport()
259 branch = self.make_branch('bzr.dev')258 branch = self.make_branch('bzr.dev')
260 if not isinstance(branch, _mod_bzrbranch.BzrBranch):259 if not branch.repository._format.supports_storing_branch_nick:
261 raise tests.TestNotApplicable("not a bzr branch format")260 raise tests.TestNotApplicable("not a bzr branch format")
262 # The nick will be 'bzr.dev', because there is no explicit nick set.261 # The nick will be 'bzr.dev', because there is no explicit nick set.
263 self.assertEqual(branch.nick, 'bzr.dev')262 self.assertEqual(branch.nick, 'bzr.dev')
264263
=== modified file 'breezy/tests/per_interrepository/test_fetch.py'
--- breezy/tests/per_interrepository/test_fetch.py 2019-05-29 03:22:34 +0000
+++ breezy/tests/per_interrepository/test_fetch.py 2020-06-11 01:55:28 +0000
@@ -520,7 +520,7 @@
520 self.assertRaises(errors.RevisionNotPresent, target.fetch, source)520 self.assertRaises(errors.RevisionNotPresent, target.fetch, source)
521 except errors.NoRoundtrippingSupport:521 except errors.NoRoundtrippingSupport:
522 raise TestNotApplicable('roundtripping not supported')522 raise TestNotApplicable('roundtripping not supported')
523 self.assertFalse(target.has_revision('b'))523 self.assertFalse(target.has_revision(b'b'))
524524
525 def test_fetch_funky_file_id(self):525 def test_fetch_funky_file_id(self):
526 from_tree = self.make_branch_and_tree('tree')526 from_tree = self.make_branch_and_tree('tree')
527527
=== modified file 'breezy/tests/test__static_tuple.py'
--- breezy/tests/test__static_tuple.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/test__static_tuple.py 2020-06-11 01:55:28 +0000
@@ -443,7 +443,15 @@
443 refs = strs + [self.module.StaticTuple]443 refs = strs + [self.module.StaticTuple]
444 else:444 else:
445 refs = strs445 refs = strs
446 self.assertEqual(sorted(refs), sorted(scanner.get_referents(k)))446 def key(k):
447 if isinstance(k, type):
448 return (0, k)
449 if isinstance(k, str):
450 return (1, k)
451 raise TypeError(k)
452 self.assertEqual(
453 sorted(refs, key=key),
454 sorted(scanner.get_referents(k), key=key))
447455
448 def test_nested_referents(self):456 def test_nested_referents(self):
449 self.requireFeature(features.meliae)457 self.requireFeature(features.meliae)
@@ -455,8 +463,15 @@
455 refs = [k1, k2]463 refs = [k1, k2]
456 if self.module is _static_tuple_py:464 if self.module is _static_tuple_py:
457 refs.append(self.module.StaticTuple)465 refs.append(self.module.StaticTuple)
458 self.assertEqual(sorted(refs),466 def key(k):
459 sorted(scanner.get_referents(k3)))467 if isinstance(k, type):
468 return (0, k)
469 if isinstance(k, self.module.StaticTuple):
470 return (1, k)
471 raise TypeError(k)
472
473 self.assertEqual(sorted(refs, key=key),
474 sorted(scanner.get_referents(k3), key=key))
460475
461 def test_empty_is_singleton(self):476 def test_empty_is_singleton(self):
462 key = self.module.StaticTuple()477 key = self.module.StaticTuple()
463478
=== modified file 'breezy/tests/test_commit.py'
--- breezy/tests/test_commit.py 2019-09-27 02:48:17 +0000
+++ breezy/tests/test_commit.py 2020-06-11 01:55:28 +0000
@@ -529,11 +529,8 @@
529 bound = master.sprout('bound')529 bound = master.sprout('bound')
530 wt = bound.open_workingtree()530 wt = bound.open_workingtree()
531 wt.branch.set_bound_location(os.path.realpath('master'))531 wt.branch.set_bound_location(os.path.realpath('master'))
532 master_branch.lock_write()532 with master_branch.lock_write():
533 try:
534 self.assertRaises(LockContention, wt.commit, 'silly')533 self.assertRaises(LockContention, wt.commit, 'silly')
535 finally:
536 master_branch.unlock()
537534
538 def test_commit_bound_merge(self):535 def test_commit_bound_merge(self):
539 # see bug #43959; commit of a merge in a bound branch fails to push536 # see bug #43959; commit of a merge in a bound branch fails to push
540537
=== modified file 'breezy/tests/test_http_response.py'
--- breezy/tests/test_http_response.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/test_http_response.py 2020-06-11 01:55:28 +0000
@@ -88,6 +88,10 @@
88 f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))88 f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))
89 self.assertEqual([b'0\n', b'1\n', b'boo!\n'], list(f))89 self.assertEqual([b'0\n', b'1\n', b'boo!\n'], list(f))
9090
91 def test_readlines(self):
92 f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))
93 self.assertEqual([b'0\n', b'1\n', b'boo!\n'], f.readlines())
94
9195
92class TestHTTPConnection(tests.TestCase):96class TestHTTPConnection(tests.TestCase):
9397
9498
=== modified file 'breezy/tests/test_lockable_files.py'
--- breezy/tests/test_lockable_files.py 2018-06-22 01:50:22 +0000
+++ breezy/tests/test_lockable_files.py 2020-06-11 01:55:28 +0000
@@ -26,7 +26,7 @@
26 TestCaseInTempDir,26 TestCaseInTempDir,
27 TestNotApplicable,27 TestNotApplicable,
28 )28 )
29from .test_smart import TestCaseWithSmartMedium29from ..bzr.tests.test_smart import TestCaseWithSmartMedium
30from .test_transactions import DummyWeave30from .test_transactions import DummyWeave
31from ..transactions import (PassThroughTransaction,31from ..transactions import (PassThroughTransaction,
32 ReadOnlyTransaction,32 ReadOnlyTransaction,
3333
=== modified file 'breezy/tests/test_matchers.py'
--- breezy/tests/test_matchers.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/test_matchers.py 2020-06-11 01:55:28 +0000
@@ -18,8 +18,6 @@
1818
19from testtools.matchers import *19from testtools.matchers import *
2020
21from ..bzr.smart.client import CallHookParams
22
23from . import (21from . import (
24 CapturedCall,22 CapturedCall,
25 TestCase,23 TestCase,
@@ -177,36 +175,6 @@
177 self.assertIsNot(None, mismatch)175 self.assertIsNot(None, mismatch)
178176
179177
180class TestContainsNoVfsCalls(TestCase):
181
182 def _make_call(self, method, args):
183 return CapturedCall(CallHookParams(method, args, None, None, None), 0)
184
185 def test__str__(self):
186 self.assertEqual("ContainsNoVfsCalls()", str(ContainsNoVfsCalls()))
187
188 def test_empty(self):
189 self.assertIs(None, ContainsNoVfsCalls().match([]))
190
191 def test_no_vfs_calls(self):
192 calls = [self._make_call("Branch.get_config_file", [])]
193 self.assertIs(None, ContainsNoVfsCalls().match(calls))
194
195 def test_ignores_unknown(self):
196 calls = [self._make_call("unknown", [])]
197 self.assertIs(None, ContainsNoVfsCalls().match(calls))
198
199 def test_match(self):
200 calls = [self._make_call(b"append", [b"file"]),
201 self._make_call(b"Branch.get_config_file", [])]
202 mismatch = ContainsNoVfsCalls().match(calls)
203 self.assertIsNot(None, mismatch)
204 self.assertEqual([calls[0].call], mismatch.vfs_calls)
205 self.assertIn(mismatch.describe(), [
206 "no VFS calls expected, got: b'append'(b'file')",
207 "no VFS calls expected, got: append('file')"])
208
209
210class TestRevisionHistoryMatches(TestCaseWithTransport):178class TestRevisionHistoryMatches(TestCaseWithTransport):
211179
212 def test_empty(self):180 def test_empty(self):
213181
=== modified file 'breezy/tests/test_selftest.py'
--- breezy/tests/test_selftest.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/test_selftest.py 2020-06-11 01:55:28 +0000
@@ -541,7 +541,7 @@
541 self.assertIsSameRealPath(self.test_home_dir, os.environ['HOME'])541 self.assertIsSameRealPath(self.test_home_dir, os.environ['HOME'])
542542
543 def test_assertEqualStat_equal(self):543 def test_assertEqualStat_equal(self):
544 from .test_dirstate import _FakeStat544 from ..bzr.tests.test_dirstate import _FakeStat
545 self.build_tree(["foo"])545 self.build_tree(["foo"])
546 real = os.lstat("foo")546 real = os.lstat("foo")
547 fake = _FakeStat(real.st_size, real.st_mtime, real.st_ctime,547 fake = _FakeStat(real.st_size, real.st_mtime, real.st_ctime,
548548
=== modified file 'breezy/tests/test_server.py'
--- breezy/tests/test_server.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/test_server.py 2020-06-11 01:55:28 +0000
@@ -246,10 +246,6 @@
246246
247class TestThread(cethread.CatchingExceptionThread):247class TestThread(cethread.CatchingExceptionThread):
248248
249 if not getattr(cethread.CatchingExceptionThread, 'is_alive', None):
250 def is_alive(self):
251 return self.isAlive()
252
253 def join(self, timeout=5):249 def join(self, timeout=5):
254 """Overrides to use a default timeout.250 """Overrides to use a default timeout.
255251
256252
=== modified file 'breezy/tests/test_tag.py'
--- breezy/tests/test_tag.py 2020-02-18 02:17:28 +0000
+++ breezy/tests/test_tag.py 2020-06-11 01:55:28 +0000
@@ -25,32 +25,12 @@
25 DisabledTags,25 DisabledTags,
26 MemoryTags,26 MemoryTags,
27 )27 )
28from breezy.bzr.tag import (
29 BasicTags,
30 )
31from breezy.tests import (28from breezy.tests import (
32 TestCase,29 TestCase,
33 TestCaseWithTransport,30 TestCaseWithTransport,
34 )31 )
3532
3633
37class TestTagSerialization(TestCase):
38
39 def test_tag_serialization(self):
40 """Test the precise representation of tag dicts."""
41 # Don't change this after we commit to this format, as it checks
42 # that the format is stable and compatible across releases.
43 #
44 # This release stores them in bencode as a dictionary from name to
45 # target.
46 store = BasicTags(branch=None)
47 td = dict(stable=b'stable-revid', boring=b'boring-revid')
48 packed = store._serialize_tag_dict(td)
49 expected = br'd6:boring12:boring-revid6:stable12:stable-revide'
50 self.assertEqualDiff(packed, expected)
51 self.assertEqual(store._deserialize_tag_dict(packed), td)
52
53
54class TestTagRevisionRenames(TestCaseWithTransport):34class TestTagRevisionRenames(TestCaseWithTransport):
5535
56 def make_branch_supporting_tags(self, relpath):36 def make_branch_supporting_tags(self, relpath):
5737
=== modified file 'breezy/tests/test_upstream_import.py'
--- breezy/tests/test_upstream_import.py 2018-11-12 01:41:38 +0000
+++ breezy/tests/test_upstream_import.py 2020-06-11 01:55:28 +0000
@@ -26,7 +26,7 @@
26 revision as _mod_revision,26 revision as _mod_revision,
27 transform27 transform
28 )28 )
29from ..bzr.bzrdir import BzrDir29from ..controldir import ControlDir
30from ..export import export30from ..export import export
31from ..upstream_import import (31from ..upstream_import import (
32 common_directory,32 common_directory,
@@ -222,7 +222,7 @@
222222
223 def archive_test(self, builder, importer, subdir=False):223 def archive_test(self, builder, importer, subdir=False):
224 archive_file = self.make_archive(builder, subdir)224 archive_file = self.make_archive(builder, subdir)
225 tree = BzrDir.create_standalone_workingtree('tree')225 tree = ControlDir.create_standalone_workingtree('tree')
226 with tree.lock_write():226 with tree.lock_write():
227 importer(tree, archive_file)227 importer(tree, archive_file)
228 self.assertTrue(tree.is_versioned('README'))228 self.assertTrue(tree.is_versioned('README'))
@@ -244,19 +244,19 @@
244244
245 def test_untar2(self):245 def test_untar2(self):
246 tar_file = self.make_messed_tar()246 tar_file = self.make_messed_tar()
247 tree = BzrDir.create_standalone_workingtree('tree')247 tree = ControlDir.create_standalone_workingtree('tree')
248 import_tar(tree, tar_file)248 import_tar(tree, tar_file)
249 self.assertTrue(tree.is_versioned('project-0.1/README'))249 self.assertTrue(tree.is_versioned('project-0.1/README'))
250250
251 def test_untar_gzip(self):251 def test_untar_gzip(self):
252 tar_file = self.make_tar(mode='w:gz')252 tar_file = self.make_tar(mode='w:gz')
253 tree = BzrDir.create_standalone_workingtree('tree')253 tree = ControlDir.create_standalone_workingtree('tree')
254 import_tar(tree, tar_file)254 import_tar(tree, tar_file)
255 self.assertTrue(tree.is_versioned('README'))255 self.assertTrue(tree.is_versioned('README'))
256256
257 def test_no_crash_with_bzrdir(self):257 def test_no_crash_with_bzrdir(self):
258 tar_file = self.make_tar_with_bzrdir()258 tar_file = self.make_tar_with_bzrdir()
259 tree = BzrDir.create_standalone_workingtree('tree')259 tree = ControlDir.create_standalone_workingtree('tree')
260 import_tar(tree, tar_file)260 import_tar(tree, tar_file)
261 # So long as it did not crash, that should be ok261 # So long as it did not crash, that should be ok
262262
263263
=== modified file 'breezy/tests/test_wsgi.py'
--- breezy/tests/test_wsgi.py 2020-02-07 02:14:30 +0000
+++ breezy/tests/test_wsgi.py 2020-06-11 01:55:28 +0000
@@ -282,7 +282,7 @@
282 response_bytes = self.read_response(iterable)282 response_bytes = self.read_response(iterable)
283 self.assertEqual('200 OK', self.status)283 self.assertEqual('200 OK', self.status)
284 # expect a successful response, rather than a jail break error284 # expect a successful response, rather than a jail break error
285 from breezy.tests.test_smart_transport import LoggingMessageHandler285 from breezy.bzr.tests.test_smart_transport import LoggingMessageHandler
286 message_handler = LoggingMessageHandler()286 message_handler = LoggingMessageHandler()
287 decoder = protocol.ProtocolThreeDecoder(287 decoder = protocol.ProtocolThreeDecoder(
288 message_handler, expect_version_marker=True)288 message_handler, expect_version_marker=True)
289289
=== modified file 'breezy/transport/http/__init__.py'
--- breezy/transport/http/__init__.py 2020-06-01 19:35:12 +0000
+++ breezy/transport/http/__init__.py 2020-06-11 01:55:28 +0000
@@ -1700,8 +1700,9 @@
1700 403,1700 403,
1701 404, # Not found1701 404, # Not found
1702 405, # Method not allowed1702 405, # Method not allowed
1703 416,1703 409, # Conflict
1704 422,1704 416, # Range not satisfiable
1705 422, # Unprocessible entity
1705 501, # Not implemented1706 501, # Not implemented
1706 ]1707 ]
1707 """The error codes the caller will handle.1708 """The error codes the caller will handle.
@@ -1900,9 +1901,14 @@
19001901
1901 @property1902 @property
1902 def text(self):1903 def text(self):
1904 if self.status == 204:
1905 return None
1903 charset = cgi.parse_header(1906 charset = cgi.parse_header(
1904 self._actual.headers['Content-Type'])[1].get('charset')1907 self._actual.headers['Content-Type'])[1].get('charset')
1905 return self.data.decode(charset)1908 if charset:
1909 return self.data.decode(charset)
1910 else:
1911 return self.data.decode()
19061912
1907 def read(self, amt=None):1913 def read(self, amt=None):
1908 return self._actual.read(amt)1914 return self._actual.read(amt)
19091915
=== modified file 'breezy/transport/http/response.py'
--- breezy/transport/http/response.py 2020-02-18 01:57:45 +0000
+++ breezy/transport/http/response.py 2020-06-11 01:55:28 +0000
@@ -78,6 +78,11 @@
78 self._pos += len(data)78 self._pos += len(data)
79 return data79 return data
8080
81 def readlines(self, size=None):
82 data = self._file.readlines()
83 self._pos += sum(map(len, data))
84 return data
85
81 def __iter__(self):86 def __iter__(self):
82 while True:87 while True:
83 line = self.readline()88 line = self.readline()
8489
=== modified file 'doc/developers/releasing.txt'
--- doc/developers/releasing.txt 2020-06-01 19:35:12 +0000
+++ doc/developers/releasing.txt 2020-06-11 01:55:28 +0000
@@ -180,8 +180,8 @@
180The process for releasing an alpha release is therefore:180The process for releasing an alpha release is therefore:
181- upload a tarball to launchpad,181- upload a tarball to launchpad,
182- upload a tarball to pypi,182- upload a tarball to pypi,
183- mail bazaar@lists.ubuntu.com,183- mail bazaar@lists.ubuntu.com,breezy-vcs@googlegroups.com
184- post an announcement on the home page. 184- post an announcement on the home page.
185185
186Uploading tarballs are described below, just use alpha versions (3, 0, 0,186Uploading tarballs are described below, just use alpha versions (3, 0, 0,
187'alpha', 1) in ``./breezy/__init__.py``187'alpha', 1) in ``./breezy/__init__.py``
188188
=== modified file 'setup.py'
--- setup.py 2020-06-01 19:35:12 +0000
+++ setup.py 2020-06-11 01:55:28 +0000
@@ -78,6 +78,8 @@
78 },78 },
79 'tests_require': [79 'tests_require': [
80 'testtools',80 'testtools',
81 'testtools<=2.4.0;python_version<"3.0"',
82 'python-subunit',
81 ],83 ],
82}84}
8385

Subscribers

People subscribed via source and target branches