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
1=== modified file 'breezy/bzr/smart/server.py'
2--- breezy/bzr/smart/server.py 2020-02-18 01:57:45 +0000
3+++ breezy/bzr/smart/server.py 2020-06-11 01:55:28 +0000
4@@ -265,7 +265,7 @@
5 still_active = []
6 for handler, thread in self._active_connections:
7 thread.join(timeout)
8- if thread.isAlive():
9+ if thread.is_alive():
10 still_active.append((handler, thread))
11 self._active_connections = still_active
12
13
14=== added directory 'breezy/bzr/tests'
15=== added file 'breezy/bzr/tests/__init__.py'
16--- breezy/bzr/tests/__init__.py 1970-01-01 00:00:00 +0000
17+++ breezy/bzr/tests/__init__.py 2020-06-11 01:55:28 +0000
18@@ -0,0 +1,85 @@
19+# Copyright (C) 2007-2020 Jelmer Vernoij <jelmer@jelmer.uk>
20+# Copyright (C) 2006, 2007 Canonical Ltd
21+#
22+# This program is free software; you can redistribute it and/or modify
23+# it under the terms of the GNU General Public License as published by
24+# the Free Software Foundation; either version 2 of the License, or
25+# (at your option) any later version.
26+#
27+# This program is distributed in the hope that it will be useful,
28+# but WITHOUT ANY WARRANTY; without even the implied warranty of
29+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+# GNU General Public License for more details.
31+#
32+# You should have received a copy of the GNU General Public License
33+# along with this program; if not, write to the Free Software
34+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35+
36+"""The basic test suite for bzr."""
37+
38+from __future__ import absolute_import
39+
40+from io import BytesIO
41+
42+import time
43+
44+from ... import (
45+ errors as bzr_errors,
46+ tests,
47+ )
48+from ...tests.features import (
49+ Feature,
50+ ModuleAvailableFeature,
51+ )
52+
53+TestCase = tests.TestCase
54+TestCaseInTempDir = tests.TestCaseInTempDir
55+TestCaseWithTransport = tests.TestCaseWithTransport
56+TestCaseWithMemoryTransport = tests.TestCaseWithMemoryTransport
57+
58+
59+def test_suite():
60+ loader = tests.TestUtil.TestLoader()
61+
62+ suite = tests.TestUtil.TestSuite()
63+
64+ testmod_names = [
65+ 'test_dirstate',
66+ 'per_bzrdir',
67+ 'per_inventory',
68+ 'per_pack_repository',
69+ 'per_repository_chk',
70+ 'per_repository_vf',
71+ 'per_versionedfile',
72+ 'test__btree_serializer',
73+ 'test__chk_map',
74+ 'test__dirstate_helpers',
75+ 'test__groupcompress',
76+ 'test_btree_index',
77+ 'test_chk_map',
78+ 'test_chk_serializer',
79+ 'test_generate_ids',
80+ 'test_groupcompress',
81+ 'test_index',
82+ 'test_inv',
83+ 'test_inventory_delta',
84+ 'test_knit',
85+ 'test_matchers',
86+ 'test_pack',
87+ 'test_remote',
88+ 'test_smart',
89+ 'test_smart_request',
90+ 'test_smart_signals',
91+ 'test_smart_transport',
92+ 'test_serializer',
93+ 'test_tags',
94+ 'test_testament',
95+ 'test_versionedfile',
96+ 'test_workingtree_4',
97+ 'test_weave',
98+ 'test_xml',
99+ ]
100+ testmod_names = ['%s.%s' % (__name__, t) for t in testmod_names]
101+ suite.addTests(loader.loadTestsFromModuleNames(testmod_names))
102+
103+ return suite
104
105=== added file 'breezy/bzr/tests/matchers.py'
106--- breezy/bzr/tests/matchers.py 1970-01-01 00:00:00 +0000
107+++ breezy/bzr/tests/matchers.py 2020-06-11 01:55:28 +0000
108@@ -0,0 +1,70 @@
109+# Copyright (C) 2010 Canonical Ltd
110+#
111+# This program is free software; you can redistribute it and/or modify
112+# it under the terms of the GNU General Public License as published by
113+# the Free Software Foundation; either version 2 of the License, or
114+# (at your option) any later version.
115+#
116+# This program is distributed in the hope that it will be useful,
117+# but WITHOUT ANY WARRANTY; without even the implied warranty of
118+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
119+# GNU General Public License for more details.
120+#
121+# You should have received a copy of the GNU General Public License
122+# along with this program; if not, write to the Free Software
123+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
124+
125+"""Matchers for breezy.
126+
127+Primarily test support, Matchers are used by self.assertThat in the breezy
128+test suite. A matcher is a stateful test helper which can be used to determine
129+if a passed object 'matches', much like a regex. If the object does not match
130+the mismatch can be described in a human readable fashion. assertThat then
131+raises if a mismatch occurs, showing the description as the assertion error.
132+
133+Matchers are designed to be more reusable and composable than layered
134+assertions in Test Case objects, so they are recommended for new testing work.
135+"""
136+
137+__all__ = [
138+ 'ContainsNoVfsCalls',
139+ ]
140+
141+from breezy.bzr.smart.request import request_handlers as smart_request_handlers
142+from breezy.bzr.smart import vfs
143+
144+from testtools.matchers import Mismatch, Matcher
145+
146+
147+class _NoVfsCallsMismatch(Mismatch):
148+ """Mismatch describing a list of HPSS calls which includes VFS requests."""
149+
150+ def __init__(self, vfs_calls):
151+ self.vfs_calls = vfs_calls
152+
153+ def describe(self):
154+ return "no VFS calls expected, got: %s" % ",".join([
155+ "%s(%s)" % (c.method,
156+ ", ".join([repr(a) for a in c.args])) for c in self.vfs_calls])
157+
158+
159+class ContainsNoVfsCalls(Matcher):
160+ """Ensure that none of the specified calls are HPSS calls."""
161+
162+ def __str__(self):
163+ return 'ContainsNoVfsCalls()'
164+
165+ @classmethod
166+ def match(cls, hpss_calls):
167+ vfs_calls = []
168+ for call in hpss_calls:
169+ try:
170+ request_method = smart_request_handlers.get(call.call.method)
171+ except KeyError:
172+ # A method we don't know about doesn't count as a VFS method.
173+ continue
174+ if issubclass(request_method, vfs.VfsRequest):
175+ vfs_calls.append(call.call)
176+ if len(vfs_calls) == 0:
177+ return None
178+ return _NoVfsCallsMismatch(vfs_calls)
179
180=== renamed directory 'breezy/tests/per_bzrdir' => 'breezy/bzr/tests/per_bzrdir'
181=== modified file 'breezy/bzr/tests/per_bzrdir/__init__.py'
182--- breezy/tests/per_bzrdir/__init__.py 2017-06-11 14:07:05 +0000
183+++ breezy/bzr/tests/per_bzrdir/__init__.py 2020-06-11 01:55:28 +0000
184@@ -55,7 +55,7 @@
185
186 def load_tests(loader, standard_tests, pattern):
187 test_per_bzrdir = [
188- 'breezy.tests.per_bzrdir.test_bzrdir',
189+ 'breezy.bzr.tests.per_bzrdir.test_bzrdir',
190 ]
191 submod_tests = loader.loadTestsFromModuleNames(test_per_bzrdir)
192 formats = [format for format in ControlDirFormat.known_formats()
193
194=== modified file 'breezy/bzr/tests/per_bzrdir/test_bzrdir.py'
195--- breezy/tests/per_bzrdir/test_bzrdir.py 2020-03-22 18:52:18 +0000
196+++ breezy/bzr/tests/per_bzrdir/test_bzrdir.py 2020-06-11 01:55:28 +0000
197@@ -36,7 +36,7 @@
198 TestNotApplicable,
199 TestSkipped,
200 )
201-from breezy.tests.per_bzrdir import TestCaseWithBzrDir
202+from breezy.bzr.tests.per_bzrdir import TestCaseWithBzrDir
203 from breezy.transport.local import (
204 LocalTransport,
205 )
206
207=== renamed directory 'breezy/tests/per_inventory' => 'breezy/bzr/tests/per_inventory'
208=== modified file 'breezy/bzr/tests/per_inventory/__init__.py'
209--- breezy/tests/per_inventory/__init__.py 2018-11-11 04:08:32 +0000
210+++ breezy/bzr/tests/per_inventory/__init__.py 2020-06-11 01:55:28 +0000
211@@ -27,7 +27,7 @@
212 def load_tests(loader, basic_tests, pattern):
213 """Generate suite containing all parameterized tests"""
214 modules_to_test = [
215- 'breezy.tests.per_inventory.basics',
216+ 'breezy.bzr.tests.per_inventory.basics',
217 ]
218 from breezy.bzr.inventory import Inventory, CHKInventory
219
220
221=== modified file 'breezy/bzr/tests/per_inventory/basics.py'
222--- breezy/tests/per_inventory/basics.py 2019-10-06 11:30:57 +0000
223+++ breezy/bzr/tests/per_inventory/basics.py 2020-06-11 01:55:28 +0000
224@@ -35,7 +35,7 @@
225 TreeReference,
226 )
227
228-from breezy.tests.per_inventory import TestCaseWithInventory
229+from breezy.bzr.tests.per_inventory import TestCaseWithInventory
230
231
232 class TestInventory(TestCaseWithInventory):
233
234=== renamed file 'breezy/tests/per_pack_repository.py' => 'breezy/bzr/tests/per_pack_repository.py'
235--- breezy/tests/per_pack_repository.py 2020-01-30 16:13:31 +0000
236+++ breezy/bzr/tests/per_pack_repository.py 2020-06-11 01:55:28 +0000
237@@ -21,9 +21,9 @@
238
239 from stat import S_ISDIR
240
241-from ..bzr.btree_index import BTreeGraphIndex
242-from ..bzr.index import GraphIndex
243-from .. import (
244+from ..btree_index import BTreeGraphIndex
245+from ..index import GraphIndex
246+from ... import (
247 controldir,
248 errors,
249 gpg,
250@@ -34,21 +34,21 @@
251 transport,
252 ui,
253 )
254-from ..bzr import (
255+from .. import (
256 inventory,
257 )
258-from ..bzr.groupcompress_repo import RepositoryFormat2a
259-from ..bzr.smart import (
260+from ..groupcompress_repo import RepositoryFormat2a
261+from ..smart import (
262 client,
263 )
264-from . import (
265+from ...tests import (
266 TestCaseWithTransport,
267 TestNotApplicable,
268 )
269-from ..transport import (
270+from ...transport import (
271 memory,
272 )
273-from . import test_server
274+from ...tests import test_server
275
276
277 class TestPackRepository(TestCaseWithTransport):
278
279=== renamed directory 'breezy/tests/per_repository_chk' => 'breezy/bzr/tests/per_repository_chk'
280=== modified file 'breezy/bzr/tests/per_repository_chk/__init__.py'
281--- breezy/tests/per_repository_chk/__init__.py 2018-11-11 04:08:32 +0000
282+++ breezy/bzr/tests/per_repository_chk/__init__.py 2020-06-11 01:55:28 +0000
283@@ -76,9 +76,9 @@
284 unsupported_scenarios.append((test_name, scenario_info))
285 result = loader.suiteClass()
286 supported_tests = loader.loadTestsFromModuleNames([
287- 'breezy.tests.per_repository_chk.test_supported'])
288+ 'breezy.bzr.tests.per_repository_chk.test_supported'])
289 unsupported_tests = loader.loadTestsFromModuleNames([
290- 'breezy.tests.per_repository_chk.test_unsupported'])
291+ 'breezy.bzr.tests.per_repository_chk.test_unsupported'])
292 multiply_tests(supported_tests, supported_scenarios, result)
293 multiply_tests(unsupported_tests, unsupported_scenarios, result)
294 return result
295
296=== modified file 'breezy/bzr/tests/per_repository_chk/test_supported.py'
297--- breezy/tests/per_repository_chk/test_supported.py 2019-05-29 03:22:34 +0000
298+++ breezy/bzr/tests/per_repository_chk/test_supported.py 2020-06-11 01:55:28 +0000
299@@ -27,7 +27,7 @@
300 from breezy.bzr.versionedfile import VersionedFiles
301 from breezy.bzr.remote import RemoteRepository
302 from breezy.tests import TestNotApplicable
303-from breezy.tests.per_repository_chk import TestCaseWithRepositoryCHK
304+from breezy.bzr.tests.per_repository_chk import TestCaseWithRepositoryCHK
305
306
307 class TestCHKSupport(TestCaseWithRepositoryCHK):
308
309=== modified file 'breezy/bzr/tests/per_repository_chk/test_unsupported.py'
310--- breezy/tests/per_repository_chk/test_unsupported.py 2017-05-21 18:10:28 +0000
311+++ breezy/bzr/tests/per_repository_chk/test_unsupported.py 2020-06-11 01:55:28 +0000
312@@ -20,7 +20,7 @@
313 attributes CHK support added should fail in known ways.
314 """
315
316-from breezy.tests.per_repository_chk import TestCaseWithRepositoryCHK
317+from breezy.bzr.tests.per_repository_chk import TestCaseWithRepositoryCHK
318
319
320 class TestNoCHKSupport(TestCaseWithRepositoryCHK):
321
322=== renamed directory 'breezy/tests/per_repository_vf' => 'breezy/bzr/tests/per_repository_vf'
323=== modified file 'breezy/bzr/tests/per_repository_vf/helpers.py'
324--- breezy/tests/per_repository_vf/helpers.py 2020-01-31 10:39:02 +0000
325+++ breezy/bzr/tests/per_repository_vf/helpers.py 2020-06-11 01:55:28 +0000
326@@ -16,17 +16,17 @@
327
328 """Helper classes for repository implementation tests."""
329
330-from ... import (
331+from .... import (
332 osutils,
333 revision as _mod_revision,
334 )
335-from ...repository import WriteGroup
336-from ...bzr import (
337+from ....repository import WriteGroup
338+from ... import (
339 inventory,
340 )
341-from ...bzr.knitrepo import RepositoryFormatKnit
342-from ..per_repository import TestCaseWithRepository
343-from .. import TestNotApplicable
344+from ...knitrepo import RepositoryFormatKnit
345+from ....tests.per_repository import TestCaseWithRepository
346+from ....tests import TestNotApplicable
347
348
349 class TestCaseWithBrokenRevisionIndex(TestCaseWithRepository):
350
351=== modified file 'breezy/bzr/tests/per_repository_vf/test__generate_text_key_index.py'
352--- breezy/tests/per_repository_vf/test__generate_text_key_index.py 2017-05-21 18:10:28 +0000
353+++ breezy/bzr/tests/per_repository_vf/test__generate_text_key_index.py 2020-06-11 01:55:28 +0000
354@@ -19,7 +19,7 @@
355
356
357 from breezy.tests.scenarios import load_tests_apply_scenarios
358-from breezy.tests.per_repository_vf import (
359+from breezy.bzr.tests.per_repository_vf import (
360 TestCaseWithRepository,
361 all_repository_vf_format_scenarios,
362 )
363
364=== modified file 'breezy/bzr/tests/per_repository_vf/test_add_inventory_by_delta.py'
365--- breezy/tests/per_repository_vf/test_add_inventory_by_delta.py 2018-11-11 04:08:32 +0000
366+++ breezy/bzr/tests/per_repository_vf/test_add_inventory_by_delta.py 2020-06-11 01:55:28 +0000
367@@ -17,7 +17,7 @@
368 """Tests for Repository.add_inventory_by_delta."""
369
370 from breezy import errors, revision
371-from breezy.tests.per_repository_vf import (
372+from breezy.bzr.tests.per_repository_vf import (
373 all_repository_vf_format_scenarios,
374 TestCaseWithRepository
375 )
376
377=== modified file 'breezy/bzr/tests/per_repository_vf/test_check.py'
378--- breezy/tests/per_repository_vf/test_check.py 2019-06-29 19:54:32 +0000
379+++ breezy/bzr/tests/per_repository_vf/test_check.py 2020-06-11 01:55:28 +0000
380@@ -24,11 +24,11 @@
381 TestNotApplicable,
382 )
383 from breezy.tests.scenarios import load_tests_apply_scenarios
384-from breezy.tests.per_repository_vf import (
385+from breezy.bzr.tests.per_repository_vf import (
386 TestCaseWithRepository,
387 all_repository_vf_format_scenarios,
388 )
389-from breezy.tests.per_repository_vf.helpers import (
390+from breezy.bzr.tests.per_repository_vf.helpers import (
391 TestCaseWithBrokenRevisionIndex,
392 )
393
394
395=== modified file 'breezy/bzr/tests/per_repository_vf/test_check_reconcile.py'
396--- breezy/tests/per_repository_vf/test_check_reconcile.py 2019-05-29 03:22:34 +0000
397+++ breezy/bzr/tests/per_repository_vf/test_check_reconcile.py 2020-06-11 01:55:28 +0000
398@@ -34,7 +34,7 @@
399 TestNotApplicable,
400 multiply_scenarios,
401 )
402-from breezy.tests.per_repository_vf import (
403+from breezy.bzr.tests.per_repository_vf import (
404 TestCaseWithRepository,
405 all_repository_vf_format_scenarios,
406 )
407
408=== modified file 'breezy/bzr/tests/per_repository_vf/test_fetch.py'
409--- breezy/tests/per_repository_vf/test_fetch.py 2018-11-11 04:08:32 +0000
410+++ breezy/bzr/tests/per_repository_vf/test_fetch.py 2020-06-11 01:55:28 +0000
411@@ -19,7 +19,7 @@
412 from breezy.bzr import (
413 vf_search,
414 )
415-from breezy.tests.per_repository_vf import (
416+from breezy.bzr.tests.per_repository_vf import (
417 TestCaseWithRepository,
418 all_repository_vf_format_scenarios,
419 )
420
421=== modified file 'breezy/bzr/tests/per_repository_vf/test_fileid_involved.py'
422--- breezy/tests/per_repository_vf/test_fileid_involved.py 2019-09-21 19:27:04 +0000
423+++ breezy/bzr/tests/per_repository_vf/test_fileid_involved.py 2020-06-11 01:55:28 +0000
424@@ -28,7 +28,7 @@
425 remote,
426 )
427 from breezy.tests.scenarios import load_tests_apply_scenarios
428-from breezy.tests.per_repository_vf import (
429+from breezy.bzr.tests.per_repository_vf import (
430 TestCaseWithRepository,
431 all_repository_vf_format_scenarios,
432 )
433
434=== modified file 'breezy/bzr/tests/per_repository_vf/test_find_text_key_references.py'
435--- breezy/tests/per_repository_vf/test_find_text_key_references.py 2017-05-21 18:10:28 +0000
436+++ breezy/bzr/tests/per_repository_vf/test_find_text_key_references.py 2020-06-11 01:55:28 +0000
437@@ -18,7 +18,7 @@
438 """Test the find_text_key_references API."""
439
440
441-from breezy.tests.per_repository_vf import (
442+from breezy.bzr.tests.per_repository_vf import (
443 TestCaseWithRepository,
444 all_repository_vf_format_scenarios,
445 )
446
447=== modified file 'breezy/bzr/tests/per_repository_vf/test_merge_directive.py'
448--- breezy/tests/per_repository_vf/test_merge_directive.py 2018-11-16 18:33:17 +0000
449+++ breezy/bzr/tests/per_repository_vf/test_merge_directive.py 2020-06-11 01:55:28 +0000
450@@ -28,7 +28,7 @@
451 )
452
453 from breezy.tests.scenarios import load_tests_apply_scenarios
454-from breezy.tests.per_repository_vf import (
455+from breezy.bzr.tests.per_repository_vf import (
456 TestCaseWithRepository,
457 all_repository_vf_format_scenarios,
458 )
459
460=== modified file 'breezy/bzr/tests/per_repository_vf/test_reconcile.py'
461--- breezy/tests/per_repository_vf/test_reconcile.py 2019-06-29 19:54:32 +0000
462+++ breezy/bzr/tests/per_repository_vf/test_reconcile.py 2020-06-11 01:55:28 +0000
463@@ -26,10 +26,10 @@
464 from breezy.revision import Revision
465 from breezy.tests import TestSkipped
466
467-from breezy.tests.per_repository_vf.helpers import (
468+from breezy.bzr.tests.per_repository_vf.helpers import (
469 TestCaseWithBrokenRevisionIndex,
470 )
471-from breezy.tests.per_repository_vf import (
472+from breezy.bzr.tests.per_repository_vf import (
473 TestCaseWithRepository,
474 all_repository_vf_format_scenarios,
475 )
476
477=== modified file 'breezy/bzr/tests/per_repository_vf/test_refresh_data.py'
478--- breezy/tests/per_repository_vf/test_refresh_data.py 2018-11-11 04:08:32 +0000
479+++ breezy/bzr/tests/per_repository_vf/test_refresh_data.py 2020-06-11 01:55:28 +0000
480@@ -21,7 +21,7 @@
481 repository,
482 )
483
484-from breezy.tests.per_repository_vf import (
485+from breezy.bzr.tests.per_repository_vf import (
486 TestCaseWithRepository,
487 all_repository_vf_format_scenarios,
488 )
489
490=== modified file 'breezy/bzr/tests/per_repository_vf/test_repository.py'
491--- breezy/tests/per_repository_vf/test_repository.py 2019-06-29 13:16:26 +0000
492+++ breezy/bzr/tests/per_repository_vf/test_repository.py 2020-06-11 01:55:28 +0000
493@@ -30,7 +30,7 @@
494 )
495
496 from breezy.tests.matchers import MatchesAncestry
497-from breezy.tests.per_repository_vf import (
498+from breezy.bzr.tests.per_repository_vf import (
499 TestCaseWithRepository,
500 all_repository_vf_format_scenarios,
501 )
502
503=== modified file 'breezy/bzr/tests/per_repository_vf/test_write_group.py'
504--- breezy/tests/per_repository_vf/test_write_group.py 2018-11-18 01:02:16 +0000
505+++ breezy/bzr/tests/per_repository_vf/test_write_group.py 2020-06-11 01:55:28 +0000
506@@ -30,7 +30,7 @@
507 remote,
508 versionedfile,
509 )
510-from breezy.tests.per_repository_vf import (
511+from breezy.bzr.tests.per_repository_vf import (
512 TestCaseWithRepository,
513 all_repository_vf_format_scenarios,
514 )
515
516=== renamed file 'breezy/tests/per_versionedfile.py' => 'breezy/bzr/tests/per_versionedfile.py'
517--- breezy/tests/per_versionedfile.py 2020-02-07 02:14:30 +0000
518+++ breezy/bzr/tests/per_versionedfile.py 2020-06-11 01:55:28 +0000
519@@ -25,7 +25,7 @@
520 from io import BytesIO
521 import itertools
522
523-from .. import (
524+from ... import (
525 errors,
526 graph as _mod_graph,
527 osutils,
528@@ -33,29 +33,29 @@
529 transport,
530 ui,
531 )
532-from ..bzr import (
533+from .. import (
534 groupcompress,
535 knit as _mod_knit,
536 )
537-from ..errors import (
538+from ...errors import (
539 RevisionNotPresent,
540 RevisionAlreadyPresent,
541 )
542-from ..bzr.knit import (
543+from ..knit import (
544 cleanup_pack_knit,
545 make_file_factory,
546 make_pack_factory,
547 )
548-from . import (
549+from ...tests import (
550 TestCase,
551 TestCaseWithMemoryTransport,
552 TestNotApplicable,
553 TestSkipped,
554 )
555-from .http_utils import TestCaseWithWebserver
556-from ..transport.memory import MemoryTransport
557-from ..bzr import versionedfile as versionedfile
558-from ..bzr.versionedfile import (
559+from ...tests.http_utils import TestCaseWithWebserver
560+from ...transport.memory import MemoryTransport
561+from .. import versionedfile as versionedfile
562+from ..versionedfile import (
563 ChunkedContentFactory,
564 ConstantMapper,
565 HashEscapedPrefixMapper,
566@@ -63,12 +63,12 @@
567 VirtualVersionedFiles,
568 make_versioned_files_factory,
569 )
570-from ..bzr.weave import (
571+from ..weave import (
572 WeaveFile,
573 WeaveInvalidChecksum,
574 )
575-from ..bzr.weavefile import write_weave
576-from .scenarios import load_tests_apply_scenarios
577+from ..weavefile import write_weave
578+from ...tests.scenarios import load_tests_apply_scenarios
579
580
581 load_tests = load_tests_apply_scenarios
582
583=== renamed file 'breezy/tests/test__btree_serializer.py' => 'breezy/bzr/tests/test__btree_serializer.py'
584--- breezy/tests/test__btree_serializer.py 2020-02-07 02:14:30 +0000
585+++ breezy/bzr/tests/test__btree_serializer.py 2020-06-11 01:55:28 +0000
586@@ -20,7 +20,7 @@
587 import binascii
588 import bisect
589
590-from .. import tests
591+from ... import tests
592
593 from .test_btree_index import compiled_btreeparser_feature
594
595
596=== renamed file 'breezy/tests/test__chk_map.py' => 'breezy/bzr/tests/test__chk_map.py'
597--- breezy/tests/test__chk_map.py 2020-02-07 02:14:30 +0000
598+++ breezy/bzr/tests/test__chk_map.py 2020-06-11 01:55:28 +0000
599@@ -16,13 +16,13 @@
600
601 """Tests for _chk_map_*."""
602
603+from ... import (
604+ tests,
605+ )
606 from .. import (
607- tests,
608- )
609-from ..bzr import (
610 chk_map,
611 )
612-from ..static_tuple import StaticTuple
613+from ...static_tuple import StaticTuple
614 stuple = StaticTuple
615
616
617
618=== renamed file 'breezy/tests/test__dirstate_helpers.py' => 'breezy/bzr/tests/test__dirstate_helpers.py'
619--- breezy/tests/test__dirstate_helpers.py 2019-06-29 13:16:26 +0000
620+++ breezy/bzr/tests/test__dirstate_helpers.py 2020-06-11 01:55:28 +0000
621@@ -20,23 +20,23 @@
622 import os
623 import time
624
625-from .. import (
626+from ... import (
627 osutils,
628 tests,
629 )
630-from ..bzr import (
631+from .. import (
632 dirstate,
633 _dirstate_helpers_py,
634 )
635 from . import (
636 test_dirstate,
637 )
638-from .test_osutils import dir_reader_scenarios
639-from .scenarios import (
640+from ...tests.test_osutils import dir_reader_scenarios
641+from ...tests.scenarios import (
642 load_tests_apply_scenarios,
643 multiply_scenarios,
644 )
645-from . import (
646+from ...tests import (
647 features,
648 )
649
650@@ -227,7 +227,7 @@
651 """Run all Bisect Path tests against _bisect_path_left."""
652
653 def get_bisect_path(self):
654- from breezy.bzr._dirstate_helpers_py import _bisect_path_left
655+ from .._dirstate_helpers_py import _bisect_path_left
656 return _bisect_path_left
657
658 def get_bisect(self):
659@@ -240,7 +240,7 @@
660 _test_needs_features = [compiled_dirstate_helpers_feature]
661
662 def get_bisect_path(self):
663- from breezy.bzr._dirstate_helpers_pyx import _bisect_path_left
664+ from .._dirstate_helpers_pyx import _bisect_path_left
665 return _bisect_path_left
666
667
668@@ -248,7 +248,7 @@
669 """Run all Bisect Path tests against _bisect_path_right"""
670
671 def get_bisect_path(self):
672- from breezy.bzr._dirstate_helpers_py import _bisect_path_right
673+ from .._dirstate_helpers_py import _bisect_path_right
674 return _bisect_path_right
675
676 def get_bisect(self):
677@@ -261,7 +261,7 @@
678 _test_needs_features = [compiled_dirstate_helpers_feature]
679
680 def get_bisect_path(self):
681- from breezy.bzr._dirstate_helpers_pyx import _bisect_path_right
682+ from .._dirstate_helpers_pyx import _bisect_path_right
683 return _bisect_path_right
684
685
686@@ -279,7 +279,7 @@
687
688 def get_bisect_dirblock(self):
689 """Return an implementation of bisect_dirblock"""
690- from breezy.bzr._dirstate_helpers_py import bisect_dirblock
691+ from .._dirstate_helpers_py import bisect_dirblock
692 return bisect_dirblock
693
694 def assertBisect(self, dirblocks, split_dirblocks, path, *args, **kwargs):
695@@ -373,7 +373,7 @@
696 _test_needs_features = [compiled_dirstate_helpers_feature]
697
698 def get_bisect_dirblock(self):
699- from breezy.bzr._dirstate_helpers_pyx import bisect_dirblock
700+ from .._dirstate_helpers_pyx import bisect_dirblock
701 return bisect_dirblock
702
703
704@@ -389,7 +389,7 @@
705
706 def get_lt_by_dirs(self):
707 """Get a specific implementation of lt_by_dirs."""
708- from ..bzr._dirstate_helpers_py import lt_by_dirs
709+ from .._dirstate_helpers_py import lt_by_dirs
710 return lt_by_dirs
711
712 def assertCmpByDirs(self, expected, str1, str2):
713@@ -496,7 +496,7 @@
714 _test_needs_features = [compiled_dirstate_helpers_feature]
715
716 def get_lt_by_dirs(self):
717- from ..bzr._dirstate_helpers_pyx import lt_by_dirs
718+ from .._dirstate_helpers_pyx import lt_by_dirs
719 return lt_by_dirs
720
721
722@@ -512,7 +512,7 @@
723
724 def get_lt_path_by_dirblock(self):
725 """Get a specific implementation of _lt_path_by_dirblock."""
726- from ..bzr._dirstate_helpers_py import _lt_path_by_dirblock
727+ from .._dirstate_helpers_py import _lt_path_by_dirblock
728 return _lt_path_by_dirblock
729
730 def assertLtPathByDirblock(self, paths):
731@@ -637,7 +637,7 @@
732 _test_needs_features = [compiled_dirstate_helpers_feature]
733
734 def get_lt_path_by_dirblock(self):
735- from ..bzr._dirstate_helpers_pyx import _lt_path_by_dirblock
736+ from .._dirstate_helpers_pyx import _lt_path_by_dirblock
737 return _lt_path_by_dirblock
738
739
740@@ -647,7 +647,7 @@
741 _test_needs_features = [compiled_dirstate_helpers_feature]
742
743 def assertMemRChr(self, expected, s, c):
744- from breezy.bzr._dirstate_helpers_pyx import _py_memrchr
745+ from .._dirstate_helpers_pyx import _py_memrchr
746 self.assertEqual(expected, _py_memrchr(s, c))
747
748 def test_missing(self):
749@@ -697,7 +697,7 @@
750 # inherits scenarios from test_dirstate
751
752 def get_read_dirblocks(self):
753- from breezy.bzr._dirstate_helpers_py import _read_dirblocks
754+ from .._dirstate_helpers_py import _read_dirblocks
755 return _read_dirblocks
756
757 def test_smoketest(self):
758@@ -737,7 +737,7 @@
759 _test_needs_features = [compiled_dirstate_helpers_feature]
760
761 def get_read_dirblocks(self):
762- from breezy.bzr._dirstate_helpers_pyx import _read_dirblocks
763+ from .._dirstate_helpers_pyx import _read_dirblocks
764 return _read_dirblocks
765
766
767@@ -751,52 +751,52 @@
768
769 def test_bisect_dirblock(self):
770 if compiled_dirstate_helpers_feature.available():
771- from breezy.bzr._dirstate_helpers_pyx import bisect_dirblock
772+ from .._dirstate_helpers_pyx import bisect_dirblock
773 else:
774- from breezy.bzr._dirstate_helpers_py import bisect_dirblock
775+ from .._dirstate_helpers_py import bisect_dirblock
776 self.assertIs(bisect_dirblock, dirstate.bisect_dirblock)
777
778 def test__bisect_path_left(self):
779 if compiled_dirstate_helpers_feature.available():
780- from breezy.bzr._dirstate_helpers_pyx import _bisect_path_left
781+ from .._dirstate_helpers_pyx import _bisect_path_left
782 else:
783- from breezy.bzr._dirstate_helpers_py import _bisect_path_left
784+ from .._dirstate_helpers_py import _bisect_path_left
785 self.assertIs(_bisect_path_left, dirstate._bisect_path_left)
786
787 def test__bisect_path_right(self):
788 if compiled_dirstate_helpers_feature.available():
789- from breezy.bzr._dirstate_helpers_pyx import _bisect_path_right
790+ from .._dirstate_helpers_pyx import _bisect_path_right
791 else:
792- from breezy.bzr._dirstate_helpers_py import _bisect_path_right
793+ from .._dirstate_helpers_py import _bisect_path_right
794 self.assertIs(_bisect_path_right, dirstate._bisect_path_right)
795
796 def test_lt_by_dirs(self):
797 if compiled_dirstate_helpers_feature.available():
798- from ..bzr._dirstate_helpers_pyx import lt_by_dirs
799+ from .._dirstate_helpers_pyx import lt_by_dirs
800 else:
801- from ..bzr._dirstate_helpers_py import lt_by_dirs
802+ from .._dirstate_helpers_py import lt_by_dirs
803 self.assertIs(lt_by_dirs, dirstate.lt_by_dirs)
804
805 def test__read_dirblocks(self):
806 if compiled_dirstate_helpers_feature.available():
807- from breezy.bzr._dirstate_helpers_pyx import _read_dirblocks
808+ from .._dirstate_helpers_pyx import _read_dirblocks
809 else:
810- from breezy.bzr._dirstate_helpers_py import _read_dirblocks
811+ from .._dirstate_helpers_py import _read_dirblocks
812 self.assertIs(_read_dirblocks, dirstate._read_dirblocks)
813
814 def test_update_entry(self):
815 if compiled_dirstate_helpers_feature.available():
816- from breezy.bzr._dirstate_helpers_pyx import update_entry
817+ from .._dirstate_helpers_pyx import update_entry
818 else:
819- from breezy.bzr.dirstate import update_entry
820+ from ..dirstate import update_entry
821 self.assertIs(update_entry, dirstate.update_entry)
822
823 def test_process_entry(self):
824 if compiled_dirstate_helpers_feature.available():
825- from breezy.bzr._dirstate_helpers_pyx import ProcessEntryC
826+ from .._dirstate_helpers_pyx import ProcessEntryC
827 self.assertIs(ProcessEntryC, dirstate._process_entry)
828 else:
829- from breezy.bzr.dirstate import ProcessEntryPython
830+ from ..dirstate import ProcessEntryPython
831 self.assertIs(ProcessEntryPython, dirstate._process_entry)
832
833
834@@ -1313,7 +1313,7 @@
835 raise RuntimeError('stop this')
836 self.overrideAttr(dirstate, 'is_inside', is_inside_raises)
837 try:
838- from breezy.bzr import _dirstate_helpers_pyx
839+ from .. import _dirstate_helpers_pyx
840 except ImportError:
841 pass
842 else:
843
844=== renamed file 'breezy/tests/test__groupcompress.py' => 'breezy/bzr/tests/test__groupcompress.py'
845--- breezy/tests/test__groupcompress.py 2020-02-07 02:14:30 +0000
846+++ breezy/bzr/tests/test__groupcompress.py 2020-06-11 01:55:28 +0000
847@@ -18,16 +18,16 @@
848
849 import sys
850
851+from ... import (
852+ tests,
853+ )
854 from .. import (
855- tests,
856- )
857-from ..bzr import (
858 _groupcompress_py,
859 )
860-from .scenarios import (
861+from ...tests.scenarios import (
862 load_tests_apply_scenarios,
863 )
864-from . import (
865+from ...tests import (
866 features,
867 )
868
869
870=== renamed file 'breezy/tests/test_btree_index.py' => 'breezy/bzr/tests/test_btree_index.py'
871--- breezy/tests/test_btree_index.py 2018-11-11 04:08:32 +0000
872+++ breezy/bzr/tests/test_btree_index.py 2020-06-11 01:55:28 +0000
873@@ -20,7 +20,7 @@
874 import pprint
875 import zlib
876
877-from .. import (
878+from ... import (
879 errors,
880 fifo_cache,
881 lru_cache,
882@@ -28,15 +28,15 @@
883 tests,
884 transport,
885 )
886-from ..bzr import (
887+from .. import (
888 btree_index,
889 index as _mod_index,
890 )
891-from ..tests import (
892+from ...tests import (
893 TestCaseWithTransport,
894 scenarios,
895 )
896-from ..tests import (
897+from ...tests import (
898 features,
899 )
900
901
902=== renamed file 'breezy/tests/test_chk_map.py' => 'breezy/bzr/tests/test_chk_map.py'
903--- breezy/tests/test_chk_map.py 2018-11-11 04:08:32 +0000
904+++ breezy/bzr/tests/test_chk_map.py 2020-06-11 01:55:28 +0000
905@@ -16,22 +16,22 @@
906
907 """Tests for maps built on a CHK versionedfiles facility."""
908
909-from .. import (
910+from ... import (
911 errors,
912 osutils,
913 tests,
914 )
915-from ..bzr import (
916+from .. import (
917 chk_map,
918 groupcompress,
919 )
920-from ..bzr.chk_map import (
921+from ..chk_map import (
922 CHKMap,
923 InternalNode,
924 LeafNode,
925 Node,
926 )
927-from ..static_tuple import StaticTuple
928+from ...static_tuple import StaticTuple
929
930
931 class TestNode(tests.TestCase):
932
933=== renamed file 'breezy/tests/test_chk_serializer.py' => 'breezy/bzr/tests/test_chk_serializer.py'
934--- breezy/tests/test_chk_serializer.py 2020-01-31 02:56:40 +0000
935+++ breezy/bzr/tests/test_chk_serializer.py 2020-06-11 01:55:28 +0000
936@@ -14,10 +14,10 @@
937 # along with this program; if not, write to the Free Software
938 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
939
940-from ..bzr.chk_serializer import (
941+from ..chk_serializer import (
942 chk_bencode_serializer,
943 )
944-from ..revision import (
945+from ...revision import (
946 Revision,
947 )
948 from . import TestCase
949
950=== renamed file 'breezy/tests/test_dirstate.py' => 'breezy/bzr/tests/test_dirstate.py'
951--- breezy/tests/test_dirstate.py 2020-01-11 02:39:17 +0000
952+++ breezy/bzr/tests/test_dirstate.py 2020-06-11 01:55:28 +0000
953@@ -19,7 +19,7 @@
954 import os
955 import tempfile
956
957-from .. import (
958+from ... import (
959 controldir,
960 errors,
961 memorytree,
962@@ -28,17 +28,17 @@
963 revisiontree,
964 tests,
965 )
966-from ..bzr import (
967+from .. import (
968 dirstate,
969 inventory,
970 inventorytree,
971 workingtree_4,
972 )
973-from . import (
974+from ...tests import (
975 features,
976 test_osutils,
977 )
978-from .scenarios import load_tests_apply_scenarios
979+from ...tests.scenarios import load_tests_apply_scenarios
980
981
982 # TODO:
983
984=== renamed file 'breezy/tests/test_generate_ids.py' => 'breezy/bzr/tests/test_generate_ids.py'
985--- breezy/tests/test_generate_ids.py 2019-02-04 19:39:30 +0000
986+++ breezy/bzr/tests/test_generate_ids.py 2020-06-11 01:55:28 +0000
987@@ -16,10 +16,10 @@
988
989 """Tests for breezy/generate_ids.py"""
990
991+from ... import (
992+ tests,
993+ )
994 from .. import (
995- tests,
996- )
997-from ..bzr import (
998 generate_ids,
999 )
1000
1001
1002=== renamed file 'breezy/tests/test_groupcompress.py' => 'breezy/bzr/tests/test_groupcompress.py'
1003--- breezy/tests/test_groupcompress.py 2020-02-09 02:20:11 +0000
1004+++ breezy/bzr/tests/test_groupcompress.py 2020-06-11 01:55:28 +0000
1005@@ -18,23 +18,23 @@
1006
1007 import zlib
1008
1009-from .. import (
1010+from ... import (
1011 config,
1012 errors,
1013 osutils,
1014 tests,
1015 trace,
1016 )
1017-from ..bzr import (
1018+from .. import (
1019 btree_index,
1020 groupcompress,
1021 knit,
1022 index as _mod_index,
1023 versionedfile,
1024 )
1025-from ..osutils import sha_string
1026+from ...osutils import sha_string
1027 from .test__groupcompress import compiled_groupcompress_feature
1028-from .scenarios import load_tests_apply_scenarios
1029+from ...tests.scenarios import load_tests_apply_scenarios
1030
1031
1032 def group_compress_implementation_scenarios():
1033
1034=== renamed file 'breezy/tests/test_index.py' => 'breezy/bzr/tests/test_index.py'
1035--- breezy/tests/test_index.py 2020-02-07 02:14:30 +0000
1036+++ breezy/bzr/tests/test_index.py 2020-06-11 01:55:28 +0000
1037@@ -16,12 +16,12 @@
1038
1039 """Tests for indices."""
1040
1041-from .. import (
1042+from ... import (
1043 errors,
1044 tests,
1045 transport,
1046 )
1047-from ..bzr import (
1048+from .. import (
1049 index as _mod_index,
1050 )
1051
1052
1053=== renamed file 'breezy/tests/test_inv.py' => 'breezy/bzr/tests/test_inv.py'
1054--- breezy/tests/test_inv.py 2020-02-07 02:14:30 +0000
1055+++ breezy/bzr/tests/test_inv.py 2020-06-11 01:55:28 +0000
1056@@ -15,7 +15,7 @@
1057 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1058
1059
1060-from .. import (
1061+from ... import (
1062 errors,
1063 osutils,
1064 repository,
1065@@ -23,12 +23,12 @@
1066 tests,
1067 workingtree,
1068 )
1069-from ..bzr import (
1070+from .. import (
1071 chk_map,
1072 groupcompress,
1073 inventory,
1074 )
1075-from ..bzr.inventory import (
1076+from ..inventory import (
1077 CHKInventory,
1078 Inventory,
1079 ROOT_ID,
1080@@ -43,7 +43,7 @@
1081 TestCase,
1082 TestCaseWithTransport,
1083 )
1084-from .scenarios import load_tests_apply_scenarios
1085+from ...tests.scenarios import load_tests_apply_scenarios
1086
1087
1088 load_tests = load_tests_apply_scenarios
1089
1090=== renamed file 'breezy/tests/test_inventory_delta.py' => 'breezy/bzr/tests/test_inventory_delta.py'
1091--- breezy/tests/test_inventory_delta.py 2020-02-13 23:57:28 +0000
1092+++ breezy/bzr/tests/test_inventory_delta.py 2020-06-11 01:55:28 +0000
1093@@ -22,14 +22,14 @@
1094 from io import (
1095 BytesIO,
1096 )
1097-from .. import osutils
1098-from ..bzr import (
1099+from ... import osutils
1100+from .. import (
1101 inventory,
1102 inventory_delta,
1103 )
1104-from ..bzr.inventory_delta import InventoryDeltaError
1105-from ..bzr.inventory import Inventory
1106-from ..revision import NULL_REVISION
1107+from ..inventory_delta import InventoryDeltaError
1108+from ..inventory import Inventory
1109+from ...revision import NULL_REVISION
1110 from . import TestCase
1111
1112 ### DO NOT REFLOW THESE TEXTS. NEW LINES ARE SIGNIFICANT. ###
1113
1114=== renamed file 'breezy/tests/test_knit.py' => 'breezy/bzr/tests/test_knit.py'
1115--- breezy/tests/test_knit.py 2020-01-26 15:23:23 +0000
1116+++ breezy/bzr/tests/test_knit.py 2020-06-11 01:55:28 +0000
1117@@ -21,19 +21,19 @@
1118 from patiencediff import PatienceSequenceMatcher
1119 import sys
1120
1121-from .. import (
1122+from ... import (
1123 errors,
1124 multiparent,
1125 osutils,
1126 tests,
1127 transport,
1128 )
1129-from ..bzr import (
1130+from .. import (
1131 knit,
1132 pack,
1133 )
1134-from ..bzr.index import *
1135-from ..bzr.knit import (
1136+from ..index import *
1137+from ..knit import (
1138 AnnotatedKnitContent,
1139 KnitContent,
1140 KnitCorrupt,
1141@@ -49,23 +49,23 @@
1142 _KnitKeyAccess,
1143 make_file_factory,
1144 )
1145-from ..bzr import (
1146+from .. import (
1147 knitpack_repo,
1148 pack_repo,
1149 )
1150-from . import (
1151+from ...tests import (
1152 TestCase,
1153 TestCaseWithMemoryTransport,
1154 TestCaseWithTransport,
1155 TestNotApplicable,
1156 )
1157-from ..bzr.versionedfile import (
1158+from ..versionedfile import (
1159 AbsentContentFactory,
1160 ConstantMapper,
1161 network_bytes_to_kind_and_offset,
1162 RecordingVersionedFilesDecorator,
1163 )
1164-from . import (
1165+from ...tests import (
1166 features,
1167 )
1168
1169@@ -938,7 +938,7 @@
1170
1171 @property
1172 def _load_data(self):
1173- from ..bzr._knit_load_data_py import _load_data_py
1174+ from .._knit_load_data_py import _load_data_py
1175 return _load_data_py
1176
1177 def get_knit_index(self, transport, name, mode):
1178@@ -1331,7 +1331,7 @@
1179
1180 @property
1181 def _load_data(self):
1182- from ..bzr._knit_load_data_pyx import _load_data_c
1183+ from .._knit_load_data_pyx import _load_data_c
1184 return _load_data_c
1185
1186
1187
1188=== added file 'breezy/bzr/tests/test_matchers.py'
1189--- breezy/bzr/tests/test_matchers.py 1970-01-01 00:00:00 +0000
1190+++ breezy/bzr/tests/test_matchers.py 2020-06-11 01:55:28 +0000
1191@@ -0,0 +1,57 @@
1192+# Copyright (C) 2010, 2011, 2012, 2016 Canonical Ltd
1193+#
1194+# This program is free software; you can redistribute it and/or modify
1195+# it under the terms of the GNU General Public License as published by
1196+# the Free Software Foundation; either version 2 of the License, or
1197+# (at your option) any later version.
1198+#
1199+# This program is distributed in the hope that it will be useful,
1200+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1201+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1202+# GNU General Public License for more details.
1203+#
1204+# You should have received a copy of the GNU General Public License
1205+# along with this program; if not, write to the Free Software
1206+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1207+
1208+"""Tests of breezy test matchers."""
1209+
1210+from testtools.matchers import *
1211+
1212+from ..smart.client import CallHookParams
1213+
1214+from ...tests import (
1215+ CapturedCall,
1216+ TestCase,
1217+ )
1218+from .matchers import *
1219+
1220+
1221+class TestContainsNoVfsCalls(TestCase):
1222+
1223+ def _make_call(self, method, args):
1224+ return CapturedCall(CallHookParams(method, args, None, None, None), 0)
1225+
1226+ def test__str__(self):
1227+ self.assertEqual("ContainsNoVfsCalls()", str(ContainsNoVfsCalls()))
1228+
1229+ def test_empty(self):
1230+ self.assertIs(None, ContainsNoVfsCalls().match([]))
1231+
1232+ def test_no_vfs_calls(self):
1233+ calls = [self._make_call("Branch.get_config_file", [])]
1234+ self.assertIs(None, ContainsNoVfsCalls().match(calls))
1235+
1236+ def test_ignores_unknown(self):
1237+ calls = [self._make_call("unknown", [])]
1238+ self.assertIs(None, ContainsNoVfsCalls().match(calls))
1239+
1240+ def test_match(self):
1241+ calls = [self._make_call(b"append", [b"file"]),
1242+ self._make_call(b"Branch.get_config_file", [])]
1243+ mismatch = ContainsNoVfsCalls().match(calls)
1244+ self.assertIsNot(None, mismatch)
1245+ self.assertEqual([calls[0].call], mismatch.vfs_calls)
1246+ self.assertIn(mismatch.describe(), [
1247+ "no VFS calls expected, got: b'append'(b'file')",
1248+ "no VFS calls expected, got: append('file')"])
1249
1250=== renamed file 'breezy/tests/test_pack.py' => 'breezy/bzr/tests/test_pack.py'
1251--- breezy/tests/test_pack.py 2020-02-13 23:57:28 +0000
1252+++ breezy/bzr/tests/test_pack.py 2020-06-11 01:55:28 +0000
1253@@ -18,8 +18,8 @@
1254
1255 from io import BytesIO
1256
1257-from .. import errors, tests
1258-from ..bzr import (
1259+from ... import errors, tests
1260+from .. import (
1261 pack,
1262 )
1263
1264
1265=== renamed file 'breezy/tests/test_remote.py' => 'breezy/bzr/tests/test_remote.py'
1266--- breezy/tests/test_remote.py 2020-02-07 02:14:30 +0000
1267+++ breezy/bzr/tests/test_remote.py 2020-06-11 01:55:28 +0000
1268@@ -29,7 +29,7 @@
1269 import tarfile
1270 import zlib
1271
1272-from .. import (
1273+from ... import (
1274 bencode,
1275 branch,
1276 config,
1277@@ -40,8 +40,8 @@
1278 transport,
1279 treebuilder,
1280 )
1281-from ..branch import Branch
1282-from ..bzr import (
1283+from ...branch import Branch
1284+from .. import (
1285 bzrdir,
1286 inventory,
1287 inventory_delta,
1288@@ -49,15 +49,15 @@
1289 versionedfile,
1290 vf_search,
1291 )
1292-from ..bzr.bzrdir import (
1293+from ..bzrdir import (
1294 BzrDir,
1295 BzrDirFormat,
1296 )
1297-from ..bzr import (
1298+from .. import (
1299 RemoteBzrProber,
1300 )
1301-from ..bzr.chk_serializer import chk_bencode_serializer
1302-from ..bzr.remote import (
1303+from ..chk_serializer import chk_bencode_serializer
1304+from ..remote import (
1305 RemoteBranch,
1306 RemoteBranchFormat,
1307 RemoteBzrDir,
1308@@ -65,24 +65,24 @@
1309 RemoteRepository,
1310 RemoteRepositoryFormat,
1311 )
1312-from ..bzr import groupcompress_repo, knitpack_repo
1313-from ..revision import (
1314+from .. import groupcompress_repo, knitpack_repo
1315+from ...revision import (
1316 NULL_REVISION,
1317 Revision,
1318 )
1319-from ..bzr.smart import medium, request
1320-from ..bzr.smart.client import _SmartClient
1321-from ..bzr.smart.repository import (
1322+from ..smart import medium, request
1323+from ..smart.client import _SmartClient
1324+from ..smart.repository import (
1325 SmartServerRepositoryGetParentMap,
1326 SmartServerRepositoryGetStream_1_19,
1327 _stream_to_byte_stream,
1328 )
1329-from . import (
1330+from ...tests import (
1331 test_server,
1332 )
1333-from .scenarios import load_tests_apply_scenarios
1334-from ..transport.memory import MemoryTransport
1335-from ..transport.remote import (
1336+from ...tests.scenarios import load_tests_apply_scenarios
1337+from ...transport.memory import MemoryTransport
1338+from ...transport.remote import (
1339 RemoteTransport,
1340 RemoteSSHTransport,
1341 RemoteTCPTransport,
1342
1343=== renamed file 'breezy/tests/test_repository.py' => 'breezy/bzr/tests/test_repository.py'
1344--- breezy/tests/test_repository.py 2020-01-30 16:13:31 +0000
1345+++ breezy/bzr/tests/test_repository.py 2020-06-11 01:55:28 +0000
1346@@ -213,7 +213,7 @@
1347
1348 def test_register_extra_lazy(self):
1349 self.assertEqual([], self.registry._get_all())
1350- self.registry.register_extra_lazy("breezy.tests.test_repository",
1351+ self.registry.register_extra_lazy(__name__,
1352 "SampleExtraRepositoryFormat")
1353 formats = self.registry._get_all()
1354 self.assertEqual(1, len(formats))
1355
1356=== renamed file 'breezy/tests/test_serializer.py' => 'breezy/bzr/tests/test_serializer.py'
1357--- breezy/tests/test_serializer.py 2017-06-10 21:59:15 +0000
1358+++ breezy/bzr/tests/test_serializer.py 2020-06-11 01:55:28 +0000
1359@@ -18,7 +18,7 @@
1360 """Tests for the revision/inventory Serializers."""
1361
1362
1363-from ..bzr import (
1364+from .. import (
1365 chk_serializer,
1366 serializer,
1367 xml5,
1368
1369=== renamed file 'breezy/tests/test_smart.py' => 'breezy/bzr/tests/test_smart.py'
1370=== renamed file 'breezy/tests/test_smart_request.py' => 'breezy/bzr/tests/test_smart_request.py'
1371=== renamed file 'breezy/tests/test_smart_signals.py' => 'breezy/bzr/tests/test_smart_signals.py'
1372=== renamed file 'breezy/tests/test_smart_transport.py' => 'breezy/bzr/tests/test_smart_transport.py'
1373--- breezy/tests/test_smart_transport.py 2020-02-07 02:14:30 +0000
1374+++ breezy/bzr/tests/test_smart_transport.py 2020-06-11 01:55:28 +0000
1375@@ -30,7 +30,7 @@
1376 from testtools.matchers import DocTestMatches
1377
1378 import breezy
1379-from .. import (
1380+from ... import (
1381 controldir,
1382 debug,
1383 errors,
1384@@ -39,10 +39,10 @@
1385 transport as _mod_transport,
1386 urlutils,
1387 )
1388-from ..bzr import (
1389+from .. import (
1390 bzrdir,
1391 )
1392-from ..bzr.smart import (
1393+from ..smart import (
1394 client,
1395 medium,
1396 message,
1397@@ -51,18 +51,20 @@
1398 server as _mod_server,
1399 vfs,
1400 )
1401-from . import (
1402+from ...tests import (
1403 features,
1404- test_smart,
1405 test_server,
1406 )
1407-from ..transport import (
1408+from ...transport import (
1409 http,
1410 local,
1411 memory,
1412 remote,
1413 ssh,
1414 )
1415+from . import (
1416+ test_smart,
1417+ )
1418
1419
1420 def create_file_pipes():
1421
1422=== added file 'breezy/bzr/tests/test_tag.py'
1423--- breezy/bzr/tests/test_tag.py 1970-01-01 00:00:00 +0000
1424+++ breezy/bzr/tests/test_tag.py 2020-06-11 01:55:28 +0000
1425@@ -0,0 +1,45 @@
1426+# Copyright (C) 2007, 2009-2012, 2016 Canonical Ltd
1427+#
1428+# This program is free software; you can redistribute it and/or modify
1429+# it under the terms of the GNU General Public License as published by
1430+# the Free Software Foundation; either version 2 of the License, or
1431+# (at your option) any later version.
1432+#
1433+# This program is distributed in the hope that it will be useful,
1434+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1435+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1436+# GNU General Public License for more details.
1437+#
1438+# You should have received a copy of the GNU General Public License
1439+# along with this program; if not, write to the Free Software
1440+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1441+
1442+"""Tests for breezy.bzr.tag."""
1443+
1444+
1445+from breezy.bzr.tag import (
1446+ BasicTags,
1447+ )
1448+from breezy.tests import (
1449+ TestCase,
1450+ )
1451+
1452+
1453+class TestTagSerialization(TestCase):
1454+
1455+ def test_tag_serialization(self):
1456+ """Test the precise representation of tag dicts."""
1457+ # Don't change this after we commit to this format, as it checks
1458+ # that the format is stable and compatible across releases.
1459+ #
1460+ # This release stores them in bencode as a dictionary from name to
1461+ # target.
1462+ store = BasicTags(branch=None)
1463+ td = dict(stable=b'stable-revid', boring=b'boring-revid')
1464+ packed = store._serialize_tag_dict(td)
1465+ expected = br'd6:boring12:boring-revid6:stable12:stable-revide'
1466+ self.assertEqualDiff(packed, expected)
1467+ self.assertEqual(store._deserialize_tag_dict(packed), td)
1468+
1469+
1470+
1471
1472=== renamed file 'breezy/tests/test_testament.py' => 'breezy/bzr/tests/test_testament.py'
1473=== renamed file 'breezy/tests/test_versionedfile.py' => 'breezy/bzr/tests/test_versionedfile.py'
1474--- breezy/tests/test_versionedfile.py 2018-11-11 04:08:32 +0000
1475+++ breezy/bzr/tests/test_versionedfile.py 2020-06-11 01:55:28 +0000
1476@@ -16,12 +16,12 @@
1477
1478 """Tests for VersionedFile classes"""
1479
1480-from .. import (
1481+from ... import (
1482 errors,
1483 multiparent,
1484 tests,
1485 )
1486-from ..bzr import (
1487+from .. import (
1488 groupcompress,
1489 versionedfile,
1490 )
1491
1492=== renamed file 'breezy/tests/test_weave.py' => 'breezy/bzr/tests/test_weave.py'
1493--- breezy/tests/test_weave.py 2020-02-07 02:14:30 +0000
1494+++ breezy/bzr/tests/test_weave.py 2020-06-11 01:55:28 +0000
1495@@ -24,13 +24,13 @@
1496 from io import BytesIO
1497 from pprint import pformat
1498
1499-from .. import (
1500+from ... import (
1501 errors,
1502 )
1503-from ..osutils import sha_string
1504+from ...osutils import sha_string
1505 from . import TestCase, TestCaseInTempDir
1506-from ..bzr.weave import Weave, WeaveFormatError, WeaveInvalidChecksum
1507-from ..bzr.weavefile import write_weave, read_weave
1508+from ..weave import Weave, WeaveFormatError, WeaveInvalidChecksum
1509+from ..weavefile import write_weave, read_weave
1510
1511
1512 # texts for use in testing
1513
1514=== renamed file 'breezy/tests/test_workingtree_4.py' => 'breezy/bzr/tests/test_workingtree_4.py'
1515--- breezy/tests/test_workingtree_4.py 2019-09-21 23:05:12 +0000
1516+++ breezy/bzr/tests/test_workingtree_4.py 2020-06-11 01:55:28 +0000
1517@@ -20,19 +20,19 @@
1518 import os
1519 import time
1520
1521-from .. import (
1522+from ... import (
1523 errors,
1524 osutils,
1525 )
1526-from ..bzr import (
1527+from .. import (
1528 bzrdir,
1529 dirstate,
1530 inventory,
1531 workingtree_4,
1532 )
1533-from ..lockdir import LockDir
1534-from . import TestCaseWithTransport, TestSkipped, features
1535-from ..tree import InterTree
1536+from ...lockdir import LockDir
1537+from ...tests import TestCaseWithTransport, TestSkipped, features
1538+from ...tree import InterTree
1539
1540
1541 class TestWorkingTreeFormat4(TestCaseWithTransport):
1542@@ -63,16 +63,10 @@
1543 # Only the last unlock call will actually reset the
1544 # ignores. (bug #785671)
1545 tree = self.make_workingtree()
1546- tree.lock_read()
1547- try:
1548- tree.lock_read()
1549- try:
1550+ with tree.lock_read():
1551+ with tree.lock_read():
1552 tree.is_ignored("foo")
1553- finally:
1554- tree.unlock()
1555 self.assertIsNot(None, tree._ignoreglobster)
1556- finally:
1557- tree.unlock()
1558 self.assertIs(None, tree._ignoreglobster)
1559
1560 def test_uses_lockdir(self):
1561
1562=== renamed file 'breezy/tests/test_xml.py' => 'breezy/bzr/tests/test_xml.py'
1563--- breezy/tests/test_xml.py 2020-02-07 02:14:30 +0000
1564+++ breezy/bzr/tests/test_xml.py 2020-06-11 01:55:28 +0000
1565@@ -16,17 +16,17 @@
1566
1567 from io import BytesIO
1568
1569-from .. import (
1570+from ... import (
1571 errors,
1572 fifo_cache,
1573 )
1574-from ..bzr import (
1575+from .. import (
1576 inventory,
1577 xml6,
1578 xml7,
1579 xml8,
1580 )
1581-from ..bzr.inventory import Inventory
1582+from ..inventory import Inventory
1583 from . import TestCase
1584 import breezy.bzr.xml5
1585
1586
1587=== modified file 'breezy/bzr/workingtree_4.py'
1588--- breezy/bzr/workingtree_4.py 2020-02-18 01:57:45 +0000
1589+++ breezy/bzr/workingtree_4.py 2020-06-11 01:55:28 +0000
1590@@ -2201,7 +2201,7 @@
1591 @classmethod
1592 def make_source_parent_tree_compiled_dirstate(klass, test_case, source,
1593 target):
1594- from ..tests.test__dirstate_helpers import \
1595+ from .tests.test__dirstate_helpers import \
1596 compiled_dirstate_helpers_feature
1597 test_case.requireFeature(compiled_dirstate_helpers_feature)
1598 from ._dirstate_helpers_pyx import ProcessEntryC
1599
1600=== modified file 'breezy/git/mapping.py'
1601--- breezy/git/mapping.py 2020-05-06 02:13:25 +0000
1602+++ breezy/git/mapping.py 2020-06-11 01:55:28 +0000
1603@@ -114,6 +114,8 @@
1604 if b"<" not in text and b">" not in text:
1605 username = text
1606 email = text
1607+ elif b">" not in text:
1608+ return text + b">"
1609 else:
1610 if text.rindex(b">") < text.rindex(b"<"):
1611 raise ValueError(text)
1612
1613=== modified file 'breezy/git/remote.py'
1614--- breezy/git/remote.py 2020-06-01 23:15:18 +0000
1615+++ breezy/git/remote.py 2020-06-11 01:55:28 +0000
1616@@ -222,11 +222,13 @@
1617 return e
1618 interesting_lines = [
1619 line for line in stderr_lines
1620- if line and line.replace('=', '')]
1621+ if line and line.replace(b'=', b'')]
1622 if len(interesting_lines) == 1:
1623 interesting_line = interesting_lines[0]
1624- return parse_git_error(url, interesting_line)
1625- return RemoteGitError('\n'.join(stderr_lines))
1626+ return parse_git_error(
1627+ url, interesting_line.decode('utf-8', 'surrogateescape'))
1628+ return RemoteGitError(
1629+ b'\n'.join(stderr_lines).decode('utf-8', 'surrogateescape'))
1630
1631
1632 class GitSmartTransport(Transport):
1633
1634=== modified file 'breezy/git/tests/test_mapping.py'
1635--- breezy/git/tests/test_mapping.py 2020-02-18 01:57:45 +0000
1636+++ breezy/git/tests/test_mapping.py 2020-06-11 01:55:28 +0000
1637@@ -441,9 +441,14 @@
1638 fix_person_identifier(b"bar@blah.nl"))
1639
1640 def test_fix(self):
1641- self.assertEqual(b"person <bar@blah.nl>",
1642- fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
1643- self.assertEqual(b"person <bar@blah.nl>",
1644- fix_person_identifier(b"person<bar@blah.nl>"))
1645+ self.assertEqual(
1646+ b"person <bar@blah.nl>",
1647+ fix_person_identifier(b"somebody <person <bar@blah.nl>>"))
1648+ self.assertEqual(
1649+ b"person <bar@blah.nl>",
1650+ fix_person_identifier(b"person<bar@blah.nl>"))
1651+ self.assertEqual(
1652+ b'Rohan Garg <rohangarg@kubuntu.org>',
1653+ fix_person_identifier(b'Rohan Garg <rohangarg@kubuntu.org'))
1654 self.assertRaises(ValueError,
1655 fix_person_identifier, b"person >bar@blah.nl<")
1656
1657=== modified file 'breezy/git/tests/test_remote.py'
1658--- breezy/git/tests/test_remote.py 2020-06-01 23:15:18 +0000
1659+++ breezy/git/tests/test_remote.py 2020-06-11 01:55:28 +0000
1660@@ -149,7 +149,7 @@
1661 def setUp(self):
1662 super(ParseHangupTests, self).setUp()
1663 try:
1664- HangupException(['foo'])
1665+ HangupException([b'foo'])
1666 except TypeError:
1667 self.skipTest('dulwich version too old')
1668
1669@@ -160,18 +160,18 @@
1670 def test_single_line(self):
1671 self.assertEqual(
1672 RemoteGitError('foo bar'),
1673- parse_git_hangup('http://', HangupException(['foo bar'])))
1674+ parse_git_hangup('http://', HangupException([b'foo bar'])))
1675
1676 def test_multi_lines(self):
1677 self.assertEqual(
1678 RemoteGitError('foo bar\nbla bla'),
1679 parse_git_hangup(
1680- 'http://', HangupException(['foo bar', 'bla bla'])))
1681+ 'http://', HangupException([b'foo bar', b'bla bla'])))
1682
1683 def test_filter_boring(self):
1684 self.assertEqual(
1685 RemoteGitError('foo bar'), parse_git_hangup('http://', HangupException(
1686- ['=======', 'foo bar', '======'])))
1687+ [b'=======', b'foo bar', b'======'])))
1688
1689 def test_permission_denied(self):
1690 self.assertEqual(
1691@@ -179,8 +179,8 @@
1692 parse_git_hangup(
1693 'http://',
1694 HangupException(
1695- ['=======',
1696- 'You are not allowed to push code to this project.', '', '======'])))
1697+ [b'=======',
1698+ b'You are not allowed to push code to this project.', b'', b'======'])))
1699
1700
1701 class TestRemoteGitBranchFormat(TestCase):
1702
1703=== modified file 'breezy/plugins/weave_fmt/repository.py'
1704--- breezy/plugins/weave_fmt/repository.py 2020-02-18 01:57:45 +0000
1705+++ breezy/plugins/weave_fmt/repository.py 2020-06-11 01:55:28 +0000
1706@@ -863,7 +863,7 @@
1707 self.source._eliminate_revisions_not_present(
1708 required_revisions))
1709 if limit is not None:
1710- topo_ordered = self.get_graph().iter_topo_order(result_set)
1711+ topo_ordered = self.source.get_graph().iter_topo_order(result_set)
1712 result_set = set(itertools.islice(topo_ordered, limit))
1713 return self.source.revision_ids_to_search_result(result_set)
1714
1715
1716=== modified file 'breezy/tests/__init__.py'
1717--- breezy/tests/__init__.py 2020-02-18 01:57:45 +0000
1718+++ breezy/tests/__init__.py 2020-06-11 01:55:28 +0000
1719@@ -3962,6 +3962,41 @@
1720 def _test_suite_testmod_names():
1721 """Return the standard list of test module names to test."""
1722 return [
1723+ 'breezy.bzr.tests.test_dirstate',
1724+ 'breezy.bzr.tests.per_bzrdir',
1725+ 'breezy.bzr.tests.per_inventory',
1726+ 'breezy.bzr.tests.per_pack_repository',
1727+ 'breezy.bzr.tests.per_repository_chk',
1728+ 'breezy.bzr.tests.per_repository_vf',
1729+ 'breezy.bzr.tests.per_versionedfile',
1730+ 'breezy.bzr.tests.test_groupcompress',
1731+ 'breezy.bzr.tests.test_btree_index',
1732+ 'breezy.bzr.tests.test_chk_map',
1733+ 'breezy.bzr.tests.test_chk_serializer',
1734+ 'breezy.bzr.tests.test_generate_ids',
1735+ 'breezy.bzr.tests.test_index',
1736+ 'breezy.bzr.tests.test_inv',
1737+ 'breezy.bzr.tests.test_inventory_delta',
1738+ 'breezy.bzr.tests.test_knit',
1739+ 'breezy.bzr.tests.test_matchers',
1740+ 'breezy.bzr.tests.test_pack',
1741+ 'breezy.bzr.tests.test_remote',
1742+ 'breezy.bzr.tests.test_repository',
1743+ 'breezy.bzr.tests.test_smart',
1744+ 'breezy.bzr.tests.test_smart_request',
1745+ 'breezy.bzr.tests.test_smart_signals',
1746+ 'breezy.bzr.tests.test_smart_transport',
1747+ 'breezy.bzr.tests.test_versionedfile',
1748+ 'breezy.bzr.tests.test_serializer',
1749+ 'breezy.bzr.tests.test_tag',
1750+ 'breezy.bzr.tests.test_testament',
1751+ 'breezy.bzr.tests.test_weave',
1752+ 'breezy.bzr.tests.test_workingtree_4',
1753+ 'breezy.bzr.tests.test_xml',
1754+ 'breezy.bzr.tests.test__btree_serializer',
1755+ 'breezy.bzr.tests.test__chk_map',
1756+ 'breezy.bzr.tests.test__dirstate_helpers',
1757+ 'breezy.bzr.tests.test__groupcompress',
1758 'breezy.git.tests.test_blackbox',
1759 'breezy.git.tests.test_builder',
1760 'breezy.git.tests.test_branch',
1761@@ -3987,34 +4022,23 @@
1762 'breezy.tests.blackbox',
1763 'breezy.tests.commands',
1764 'breezy.tests.per_branch',
1765- 'breezy.tests.per_bzrdir',
1766 'breezy.tests.per_controldir',
1767 'breezy.tests.per_controldir_colo',
1768 'breezy.tests.per_foreign_vcs',
1769 'breezy.tests.per_interrepository',
1770 'breezy.tests.per_intertree',
1771- 'breezy.tests.per_inventory',
1772 'breezy.tests.per_interbranch',
1773 'breezy.tests.per_lock',
1774 'breezy.tests.per_merger',
1775 'breezy.tests.per_transport',
1776 'breezy.tests.per_tree',
1777- 'breezy.tests.per_pack_repository',
1778 'breezy.tests.per_repository',
1779- 'breezy.tests.per_repository_chk',
1780 'breezy.tests.per_repository_reference',
1781- 'breezy.tests.per_repository_vf',
1782 'breezy.tests.per_uifactory',
1783- 'breezy.tests.per_versionedfile',
1784 'breezy.tests.per_workingtree',
1785 'breezy.tests.test__annotator',
1786 'breezy.tests.test__bencode',
1787- 'breezy.tests.test__btree_serializer',
1788- 'breezy.tests.test__chk_map',
1789- 'breezy.tests.test__dirstate_helpers',
1790- 'breezy.tests.test__groupcompress',
1791 'breezy.tests.test__known_graph',
1792- 'breezy.tests.test__rio',
1793 'breezy.tests.test__simple_set',
1794 'breezy.tests.test__static_tuple',
1795 'breezy.tests.test__walkdirs_win32',
1796@@ -4026,14 +4050,11 @@
1797 'breezy.tests.test_bisect_multi',
1798 'breezy.tests.test_branch',
1799 'breezy.tests.test_branchbuilder',
1800- 'breezy.tests.test_btree_index',
1801 'breezy.tests.test_bugtracker',
1802 'breezy.tests.test_bundle',
1803 'breezy.tests.test_bzrdir',
1804 'breezy.tests.test__chunks_to_lines',
1805 'breezy.tests.test_cache_utf8',
1806- 'breezy.tests.test_chk_map',
1807- 'breezy.tests.test_chk_serializer',
1808 'breezy.tests.test_chunk_writer',
1809 'breezy.tests.test_clean_tree',
1810 'breezy.tests.test_cmdline',
1811@@ -4051,7 +4072,6 @@
1812 'breezy.tests.test_debug',
1813 'breezy.tests.test_diff',
1814 'breezy.tests.test_directory_service',
1815- 'breezy.tests.test_dirstate',
1816 'breezy.tests.test_email_message',
1817 'breezy.tests.test_eol_filters',
1818 'breezy.tests.test_errors',
1819@@ -4068,12 +4088,10 @@
1820 'breezy.tests.test_filter_tree',
1821 'breezy.tests.test_foreign',
1822 'breezy.tests.test_generate_docs',
1823- 'breezy.tests.test_generate_ids',
1824 'breezy.tests.test_globbing',
1825 'breezy.tests.test_gpg',
1826 'breezy.tests.test_graph',
1827 'breezy.tests.test_grep',
1828- 'breezy.tests.test_groupcompress',
1829 'breezy.tests.test_hashcache',
1830 'breezy.tests.test_help',
1831 'breezy.tests.test_hooks',
1832@@ -4084,12 +4102,8 @@
1833 'breezy.tests.test_i18n',
1834 'breezy.tests.test_identitymap',
1835 'breezy.tests.test_ignores',
1836- 'breezy.tests.test_index',
1837 'breezy.tests.test_import_tariff',
1838 'breezy.tests.test_info',
1839- 'breezy.tests.test_inv',
1840- 'breezy.tests.test_inventory_delta',
1841- 'breezy.tests.test_knit',
1842 'breezy.tests.test_lazy_import',
1843 'breezy.tests.test_lazy_regex',
1844 'breezy.tests.test_library_state',
1845@@ -4118,7 +4132,6 @@
1846 'breezy.tests.test_options',
1847 'breezy.tests.test_osutils',
1848 'breezy.tests.test_osutils_encodings',
1849- 'breezy.tests.test_pack',
1850 'breezy.tests.test_patch',
1851 'breezy.tests.test_patches',
1852 'breezy.tests.test_permissions',
1853@@ -4130,30 +4143,24 @@
1854 'breezy.tests.test_reconcile',
1855 'breezy.tests.test_reconfigure',
1856 'breezy.tests.test_registry',
1857- 'breezy.tests.test_remote',
1858 'breezy.tests.test_rename_map',
1859- 'breezy.tests.test_repository',
1860 'breezy.tests.test_revert',
1861 'breezy.tests.test_revision',
1862 'breezy.tests.test_revisionspec',
1863 'breezy.tests.test_revisiontree',
1864 'breezy.tests.test_rio',
1865+ 'breezy.tests.test__rio',
1866 'breezy.tests.test_rules',
1867 'breezy.tests.test_url_policy_open',
1868 'breezy.tests.test_sampler',
1869 'breezy.tests.test_scenarios',
1870 'breezy.tests.test_script',
1871 'breezy.tests.test_selftest',
1872- 'breezy.tests.test_serializer',
1873 'breezy.tests.test_setup',
1874 'breezy.tests.test_sftp_transport',
1875 'breezy.tests.test_shelf',
1876 'breezy.tests.test_shelf_ui',
1877- 'breezy.tests.test_smart',
1878 'breezy.tests.test_smart_add',
1879- 'breezy.tests.test_smart_request',
1880- 'breezy.tests.test_smart_signals',
1881- 'breezy.tests.test_smart_transport',
1882 'breezy.tests.test_smtp_connection',
1883 'breezy.tests.test_source',
1884 'breezy.tests.test_ssh_transport',
1885@@ -4164,7 +4171,6 @@
1886 'breezy.tests.test_symbol_versioning',
1887 'breezy.tests.test_tag',
1888 'breezy.tests.test_test_server',
1889- 'breezy.tests.test_testament',
1890 'breezy.tests.test_textfile',
1891 'breezy.tests.test_textmerge',
1892 'breezy.tests.test_cethread',
1893@@ -4188,16 +4194,12 @@
1894 'breezy.tests.test_utextwrap',
1895 'breezy.tests.test_version',
1896 'breezy.tests.test_version_info',
1897- 'breezy.tests.test_versionedfile',
1898 'breezy.tests.test_vf_search',
1899 'breezy.tests.test_views',
1900- 'breezy.tests.test_weave',
1901 'breezy.tests.test_whitebox',
1902 'breezy.tests.test_win32utils',
1903 'breezy.tests.test_workingtree',
1904- 'breezy.tests.test_workingtree_4',
1905 'breezy.tests.test_wsgi',
1906- 'breezy.tests.test_xml',
1907 ]
1908
1909
1910
1911=== modified file 'breezy/tests/blackbox/test_annotate.py'
1912--- breezy/tests/blackbox/test_annotate.py 2019-06-16 17:36:59 +0000
1913+++ breezy/tests/blackbox/test_annotate.py 2020-06-11 01:55:28 +0000
1914@@ -29,7 +29,7 @@
1915 tests,
1916 )
1917
1918-from breezy.tests.matchers import ContainsNoVfsCalls
1919+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
1920 from breezy.urlutils import joinpath
1921
1922 from ..test_bedding import override_whoami
1923
1924=== modified file 'breezy/tests/blackbox/test_branch.py'
1925--- breezy/tests/blackbox/test_branch.py 2020-04-02 01:37:43 +0000
1926+++ breezy/tests/blackbox/test_branch.py 2020-06-11 01:55:28 +0000
1927@@ -38,7 +38,7 @@
1928 HardlinkFeature,
1929 )
1930 from breezy.tests.blackbox import test_switch
1931-from breezy.tests.matchers import ContainsNoVfsCalls
1932+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
1933 from breezy.tests.test_sftp_transport import TestCaseWithSFTPServer
1934 from breezy.tests.script import run_script
1935 from breezy.urlutils import local_path_to_url, strip_trailing_slash
1936
1937=== modified file 'breezy/tests/blackbox/test_break_lock.py'
1938--- breezy/tests/blackbox/test_break_lock.py 2018-11-11 04:08:32 +0000
1939+++ breezy/tests/blackbox/test_break_lock.py 2020-06-11 01:55:28 +0000
1940@@ -24,7 +24,7 @@
1941 osutils,
1942 tests,
1943 )
1944-from breezy.tests.matchers import ContainsNoVfsCalls
1945+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
1946 from breezy.tests.script import (
1947 run_script,
1948 )
1949
1950=== modified file 'breezy/tests/blackbox/test_cat.py'
1951--- breezy/tests/blackbox/test_cat.py 2018-11-11 04:08:32 +0000
1952+++ breezy/tests/blackbox/test_cat.py 2020-06-11 01:55:28 +0000
1953@@ -19,7 +19,7 @@
1954 """
1955
1956 from ... import tests
1957-from ..matchers import ContainsNoVfsCalls
1958+from ...bzr.tests.matchers import ContainsNoVfsCalls
1959 from ...transport import memory
1960
1961
1962
1963=== modified file 'breezy/tests/blackbox/test_checkout.py'
1964--- breezy/tests/blackbox/test_checkout.py 2020-01-19 13:07:15 +0000
1965+++ breezy/tests/blackbox/test_checkout.py 2020-06-11 01:55:28 +0000
1966@@ -30,7 +30,7 @@
1967 from breezy.tests import (
1968 TestCaseWithTransport,
1969 )
1970-from breezy.tests.matchers import ContainsNoVfsCalls
1971+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
1972 from breezy.tests.features import (
1973 HardlinkFeature,
1974 )
1975
1976=== modified file 'breezy/tests/blackbox/test_commit.py'
1977--- breezy/tests/blackbox/test_commit.py 2020-02-07 02:14:30 +0000
1978+++ breezy/tests/blackbox/test_commit.py 2020-06-11 01:55:28 +0000
1979@@ -36,7 +36,7 @@
1980 features,
1981 )
1982 from .. import TestCaseWithTransport
1983-from ..matchers import ContainsNoVfsCalls
1984+from ...bzr.tests.matchers import ContainsNoVfsCalls
1985 from ..test_bedding import override_whoami
1986
1987
1988
1989=== modified file 'breezy/tests/blackbox/test_config.py'
1990--- breezy/tests/blackbox/test_config.py 2018-11-11 04:08:32 +0000
1991+++ breezy/tests/blackbox/test_config.py 2020-06-11 01:55:28 +0000
1992@@ -25,7 +25,7 @@
1993 script,
1994 test_config as _t_config,
1995 )
1996-from ..matchers import ContainsNoVfsCalls
1997+from ...bzr.tests.matchers import ContainsNoVfsCalls
1998
1999
2000 class TestWithoutConfig(tests.TestCaseWithTransport):
2001
2002=== modified file 'breezy/tests/blackbox/test_export.py'
2003--- breezy/tests/blackbox/test_export.py 2020-02-07 02:14:30 +0000
2004+++ breezy/tests/blackbox/test_export.py 2020-06-11 01:55:28 +0000
2005@@ -35,7 +35,7 @@
2006 features,
2007 TestCaseWithTransport,
2008 )
2009-from ..matchers import ContainsNoVfsCalls
2010+from ...bzr.tests.matchers import ContainsNoVfsCalls
2011
2012
2013 class TestExport(TestCaseWithTransport):
2014
2015=== modified file 'breezy/tests/blackbox/test_info.py'
2016--- breezy/tests/blackbox/test_info.py 2019-09-21 19:27:04 +0000
2017+++ breezy/tests/blackbox/test_info.py 2020-06-11 01:55:28 +0000
2018@@ -33,7 +33,7 @@
2019 from breezy.bzr import (
2020 bzrdir,
2021 )
2022-from breezy.tests.matchers import ContainsNoVfsCalls
2023+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2024 from breezy.transport import memory
2025
2026
2027
2028=== modified file 'breezy/tests/blackbox/test_log.py'
2029--- breezy/tests/blackbox/test_log.py 2020-02-18 01:57:45 +0000
2030+++ breezy/tests/blackbox/test_log.py 2020-06-11 01:55:28 +0000
2031@@ -31,7 +31,7 @@
2032 test_log,
2033 features,
2034 )
2035-from breezy.tests.matchers import ContainsNoVfsCalls
2036+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2037
2038
2039 class TestLog(tests.TestCaseWithTransport, test_log.TestLogMixin):
2040
2041=== modified file 'breezy/tests/blackbox/test_ls.py'
2042--- breezy/tests/blackbox/test_ls.py 2018-11-11 04:08:32 +0000
2043+++ breezy/tests/blackbox/test_ls.py 2020-06-11 01:55:28 +0000
2044@@ -20,7 +20,7 @@
2045 ignores,
2046 tests,
2047 )
2048-from breezy.tests.matchers import ContainsNoVfsCalls
2049+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2050
2051
2052 class TestLS(tests.TestCaseWithTransport):
2053
2054=== modified file 'breezy/tests/blackbox/test_pack.py'
2055--- breezy/tests/blackbox/test_pack.py 2018-11-11 04:08:32 +0000
2056+++ breezy/tests/blackbox/test_pack.py 2020-06-11 01:55:28 +0000
2057@@ -19,7 +19,7 @@
2058 import os
2059
2060 from breezy import tests
2061-from breezy.tests.matchers import ContainsNoVfsCalls
2062+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2063
2064
2065 class TestPack(tests.TestCaseWithTransport):
2066
2067=== modified file 'breezy/tests/blackbox/test_push.py'
2068--- breezy/tests/blackbox/test_push.py 2019-09-01 15:33:59 +0000
2069+++ breezy/tests/blackbox/test_push.py 2020-06-11 01:55:28 +0000
2070@@ -41,7 +41,7 @@
2071 script,
2072 test_foreign,
2073 )
2074-from breezy.tests.matchers import ContainsNoVfsCalls
2075+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2076 from breezy.transport import memory
2077
2078
2079
2080=== modified file 'breezy/tests/blackbox/test_reconcile.py'
2081--- breezy/tests/blackbox/test_reconcile.py 2019-05-29 03:22:34 +0000
2082+++ breezy/tests/blackbox/test_reconcile.py 2020-06-11 01:55:28 +0000
2083@@ -25,7 +25,7 @@
2084 from breezy.bzr import (
2085 inventory,
2086 )
2087-from breezy.tests.matchers import ContainsNoVfsCalls
2088+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2089
2090
2091 class TrivialTest(tests.TestCaseWithTransport):
2092
2093=== modified file 'breezy/tests/blackbox/test_revno.py'
2094--- breezy/tests/blackbox/test_revno.py 2018-11-16 11:37:47 +0000
2095+++ breezy/tests/blackbox/test_revno.py 2020-06-11 01:55:28 +0000
2096@@ -22,7 +22,7 @@
2097
2098 from breezy import tests
2099 from breezy.errors import NoSuchRevision
2100-from breezy.tests.matchers import ContainsNoVfsCalls
2101+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2102
2103
2104 class TestRevno(tests.TestCaseWithTransport):
2105
2106=== modified file 'breezy/tests/blackbox/test_rmbranch.py'
2107--- breezy/tests/blackbox/test_rmbranch.py 2018-11-11 04:08:32 +0000
2108+++ breezy/tests/blackbox/test_rmbranch.py 2020-06-11 01:55:28 +0000
2109@@ -23,7 +23,7 @@
2110 from breezy.tests import (
2111 TestCaseWithTransport,
2112 )
2113-from breezy.tests.matchers import ContainsNoVfsCalls
2114+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2115
2116
2117 class TestRemoveBranch(TestCaseWithTransport):
2118
2119=== modified file 'breezy/tests/blackbox/test_send.py'
2120--- breezy/tests/blackbox/test_send.py 2020-02-07 02:14:30 +0000
2121+++ breezy/tests/blackbox/test_send.py 2020-06-11 01:55:28 +0000
2122@@ -30,7 +30,7 @@
2123 from .. import (
2124 scenarios,
2125 )
2126-from ..matchers import ContainsNoVfsCalls
2127+from ...bzr.tests.matchers import ContainsNoVfsCalls
2128
2129
2130 load_tests = scenarios.load_tests_apply_scenarios
2131
2132=== modified file 'breezy/tests/blackbox/test_shared_repository.py'
2133--- breezy/tests/blackbox/test_shared_repository.py 2019-09-01 15:33:59 +0000
2134+++ breezy/tests/blackbox/test_shared_repository.py 2020-06-11 01:55:28 +0000
2135@@ -22,7 +22,7 @@
2136 from breezy.controldir import ControlDir
2137 import breezy.errors as errors
2138 from breezy.tests import TestCaseInTempDir
2139-from breezy.tests.matchers import ContainsNoVfsCalls
2140+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2141
2142
2143 class TestSharedRepo(TestCaseInTempDir):
2144
2145=== modified file 'breezy/tests/blackbox/test_sign_my_commits.py'
2146--- breezy/tests/blackbox/test_sign_my_commits.py 2018-11-11 04:08:32 +0000
2147+++ breezy/tests/blackbox/test_sign_my_commits.py 2020-06-11 01:55:28 +0000
2148@@ -21,7 +21,7 @@
2149 gpg,
2150 tests,
2151 )
2152-from breezy.tests.matchers import ContainsNoVfsCalls
2153+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2154
2155
2156 class SignMyCommits(tests.TestCaseWithTransport):
2157
2158=== modified file 'breezy/tests/blackbox/test_switch.py'
2159--- breezy/tests/blackbox/test_switch.py 2020-03-22 18:52:18 +0000
2160+++ breezy/tests/blackbox/test_switch.py 2020-06-11 01:55:28 +0000
2161@@ -34,7 +34,7 @@
2162 from breezy.tests.features import UnicodeFilenameFeature
2163 from breezy.directory_service import directories
2164
2165-from breezy.tests.matchers import ContainsNoVfsCalls
2166+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2167
2168
2169 class TestSwitch(TestCaseWithTransport):
2170
2171=== modified file 'breezy/tests/blackbox/test_tags.py'
2172--- breezy/tests/blackbox/test_tags.py 2020-02-07 02:14:30 +0000
2173+++ breezy/tests/blackbox/test_tags.py 2020-06-11 01:55:28 +0000
2174@@ -35,7 +35,7 @@
2175 script,
2176 TestCaseWithTransport,
2177 )
2178-from breezy.tests.matchers import ContainsNoVfsCalls
2179+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2180 from breezy.workingtree import WorkingTree
2181
2182
2183
2184=== modified file 'breezy/tests/blackbox/test_testament.py'
2185--- breezy/tests/blackbox/test_testament.py 2020-02-07 02:14:30 +0000
2186+++ breezy/tests/blackbox/test_testament.py 2020-06-11 01:55:28 +0000
2187@@ -18,7 +18,7 @@
2188
2189 import re
2190
2191-from breezy.tests.test_testament import (
2192+from breezy.bzr.tests.test_testament import (
2193 osutils,
2194 REV_1_SHORT,
2195 REV_1_SHORT_STRICT,
2196
2197=== modified file 'breezy/tests/blackbox/test_uncommit.py'
2198--- breezy/tests/blackbox/test_uncommit.py 2019-02-16 17:54:34 +0000
2199+++ breezy/tests/blackbox/test_uncommit.py 2020-06-11 01:55:28 +0000
2200@@ -22,7 +22,7 @@
2201 from breezy.bzr.bzrdir import BzrDirMetaFormat1
2202 from breezy.errors import BoundBranchOutOfDate
2203 from breezy.tests import TestCaseWithTransport
2204-from breezy.tests.matchers import ContainsNoVfsCalls
2205+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2206 from breezy.tests.script import (
2207 run_script,
2208 ScriptRunner,
2209
2210=== modified file 'breezy/tests/blackbox/test_verify_signatures.py'
2211--- breezy/tests/blackbox/test_verify_signatures.py 2018-11-11 04:08:32 +0000
2212+++ breezy/tests/blackbox/test_verify_signatures.py 2020-06-11 01:55:28 +0000
2213@@ -21,7 +21,7 @@
2214 gpg,
2215 tests,
2216 )
2217-from breezy.tests.matchers import ContainsNoVfsCalls
2218+from breezy.bzr.tests.matchers import ContainsNoVfsCalls
2219
2220
2221 class TestVerifySignatures(tests.TestCaseWithTransport):
2222
2223=== modified file 'breezy/tests/matchers.py'
2224--- breezy/tests/matchers.py 2020-02-13 23:57:28 +0000
2225+++ breezy/tests/matchers.py 2020-06-11 01:55:28 +0000
2226@@ -30,7 +30,6 @@
2227 'HasLayout',
2228 'HasPathRelations',
2229 'MatchesAncestry',
2230- 'ContainsNoVfsCalls',
2231 'ReturnsUnlockable',
2232 'RevisionHistoryMatches',
2233 ]
2234@@ -39,16 +38,8 @@
2235 osutils,
2236 revision as _mod_revision,
2237 )
2238-from .. import lazy_import
2239-lazy_import.lazy_import(globals(),
2240- """
2241-from breezy.bzr.smart.request import request_handlers as smart_request_handlers
2242-from breezy.bzr.smart import vfs
2243-""")
2244-from ..tree import (
2245- find_previous_path,
2246- InterTree,
2247- )
2248+
2249+from ..tree import InterTree
2250
2251 from testtools.matchers import Equals, Mismatch, Matcher
2252
2253@@ -278,37 +269,3 @@
2254 branch.last_revision(), [_mod_revision.NULL_REVISION]))
2255 history.reverse()
2256 return Equals(self.expected).match(history)
2257-
2258-
2259-class _NoVfsCallsMismatch(Mismatch):
2260- """Mismatch describing a list of HPSS calls which includes VFS requests."""
2261-
2262- def __init__(self, vfs_calls):
2263- self.vfs_calls = vfs_calls
2264-
2265- def describe(self):
2266- return "no VFS calls expected, got: %s" % ",".join([
2267- "%s(%s)" % (c.method,
2268- ", ".join([repr(a) for a in c.args])) for c in self.vfs_calls])
2269-
2270-
2271-class ContainsNoVfsCalls(Matcher):
2272- """Ensure that none of the specified calls are HPSS calls."""
2273-
2274- def __str__(self):
2275- return 'ContainsNoVfsCalls()'
2276-
2277- @classmethod
2278- def match(cls, hpss_calls):
2279- vfs_calls = []
2280- for call in hpss_calls:
2281- try:
2282- request_method = smart_request_handlers.get(call.call.method)
2283- except KeyError:
2284- # A method we don't know about doesn't count as a VFS method.
2285- continue
2286- if issubclass(request_method, vfs.VfsRequest):
2287- vfs_calls.append(call.call)
2288- if len(vfs_calls) == 0:
2289- return None
2290- return _NoVfsCallsMismatch(vfs_calls)
2291
2292=== modified file 'breezy/tests/per_branch/test_branch.py'
2293--- breezy/tests/per_branch/test_branch.py 2020-02-07 02:14:30 +0000
2294+++ breezy/tests/per_branch/test_branch.py 2020-06-11 01:55:28 +0000
2295@@ -37,7 +37,6 @@
2296 tree as _mod_tree,
2297 )
2298 from breezy.bzr import (
2299- branch as _mod_bzrbranch,
2300 remote,
2301 )
2302 from breezy.tests import (
2303@@ -257,7 +256,7 @@
2304 """
2305 t = self.get_transport()
2306 branch = self.make_branch('bzr.dev')
2307- if not isinstance(branch, _mod_bzrbranch.BzrBranch):
2308+ if not branch.repository._format.supports_storing_branch_nick:
2309 raise tests.TestNotApplicable("not a bzr branch format")
2310 # The nick will be 'bzr.dev', because there is no explicit nick set.
2311 self.assertEqual(branch.nick, 'bzr.dev')
2312
2313=== modified file 'breezy/tests/per_interrepository/test_fetch.py'
2314--- breezy/tests/per_interrepository/test_fetch.py 2019-05-29 03:22:34 +0000
2315+++ breezy/tests/per_interrepository/test_fetch.py 2020-06-11 01:55:28 +0000
2316@@ -520,7 +520,7 @@
2317 self.assertRaises(errors.RevisionNotPresent, target.fetch, source)
2318 except errors.NoRoundtrippingSupport:
2319 raise TestNotApplicable('roundtripping not supported')
2320- self.assertFalse(target.has_revision('b'))
2321+ self.assertFalse(target.has_revision(b'b'))
2322
2323 def test_fetch_funky_file_id(self):
2324 from_tree = self.make_branch_and_tree('tree')
2325
2326=== modified file 'breezy/tests/test__static_tuple.py'
2327--- breezy/tests/test__static_tuple.py 2020-02-07 02:14:30 +0000
2328+++ breezy/tests/test__static_tuple.py 2020-06-11 01:55:28 +0000
2329@@ -443,7 +443,15 @@
2330 refs = strs + [self.module.StaticTuple]
2331 else:
2332 refs = strs
2333- self.assertEqual(sorted(refs), sorted(scanner.get_referents(k)))
2334+ def key(k):
2335+ if isinstance(k, type):
2336+ return (0, k)
2337+ if isinstance(k, str):
2338+ return (1, k)
2339+ raise TypeError(k)
2340+ self.assertEqual(
2341+ sorted(refs, key=key),
2342+ sorted(scanner.get_referents(k), key=key))
2343
2344 def test_nested_referents(self):
2345 self.requireFeature(features.meliae)
2346@@ -455,8 +463,15 @@
2347 refs = [k1, k2]
2348 if self.module is _static_tuple_py:
2349 refs.append(self.module.StaticTuple)
2350- self.assertEqual(sorted(refs),
2351- sorted(scanner.get_referents(k3)))
2352+ def key(k):
2353+ if isinstance(k, type):
2354+ return (0, k)
2355+ if isinstance(k, self.module.StaticTuple):
2356+ return (1, k)
2357+ raise TypeError(k)
2358+
2359+ self.assertEqual(sorted(refs, key=key),
2360+ sorted(scanner.get_referents(k3), key=key))
2361
2362 def test_empty_is_singleton(self):
2363 key = self.module.StaticTuple()
2364
2365=== modified file 'breezy/tests/test_commit.py'
2366--- breezy/tests/test_commit.py 2019-09-27 02:48:17 +0000
2367+++ breezy/tests/test_commit.py 2020-06-11 01:55:28 +0000
2368@@ -529,11 +529,8 @@
2369 bound = master.sprout('bound')
2370 wt = bound.open_workingtree()
2371 wt.branch.set_bound_location(os.path.realpath('master'))
2372- master_branch.lock_write()
2373- try:
2374+ with master_branch.lock_write():
2375 self.assertRaises(LockContention, wt.commit, 'silly')
2376- finally:
2377- master_branch.unlock()
2378
2379 def test_commit_bound_merge(self):
2380 # see bug #43959; commit of a merge in a bound branch fails to push
2381
2382=== modified file 'breezy/tests/test_http_response.py'
2383--- breezy/tests/test_http_response.py 2020-02-07 02:14:30 +0000
2384+++ breezy/tests/test_http_response.py 2020-06-11 01:55:28 +0000
2385@@ -88,6 +88,10 @@
2386 f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))
2387 self.assertEqual([b'0\n', b'1\n', b'boo!\n'], list(f))
2388
2389+ def test_readlines(self):
2390+ f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))
2391+ self.assertEqual([b'0\n', b'1\n', b'boo!\n'], f.readlines())
2392+
2393
2394 class TestHTTPConnection(tests.TestCase):
2395
2396
2397=== modified file 'breezy/tests/test_lockable_files.py'
2398--- breezy/tests/test_lockable_files.py 2018-06-22 01:50:22 +0000
2399+++ breezy/tests/test_lockable_files.py 2020-06-11 01:55:28 +0000
2400@@ -26,7 +26,7 @@
2401 TestCaseInTempDir,
2402 TestNotApplicable,
2403 )
2404-from .test_smart import TestCaseWithSmartMedium
2405+from ..bzr.tests.test_smart import TestCaseWithSmartMedium
2406 from .test_transactions import DummyWeave
2407 from ..transactions import (PassThroughTransaction,
2408 ReadOnlyTransaction,
2409
2410=== modified file 'breezy/tests/test_matchers.py'
2411--- breezy/tests/test_matchers.py 2020-02-07 02:14:30 +0000
2412+++ breezy/tests/test_matchers.py 2020-06-11 01:55:28 +0000
2413@@ -18,8 +18,6 @@
2414
2415 from testtools.matchers import *
2416
2417-from ..bzr.smart.client import CallHookParams
2418-
2419 from . import (
2420 CapturedCall,
2421 TestCase,
2422@@ -177,36 +175,6 @@
2423 self.assertIsNot(None, mismatch)
2424
2425
2426-class TestContainsNoVfsCalls(TestCase):
2427-
2428- def _make_call(self, method, args):
2429- return CapturedCall(CallHookParams(method, args, None, None, None), 0)
2430-
2431- def test__str__(self):
2432- self.assertEqual("ContainsNoVfsCalls()", str(ContainsNoVfsCalls()))
2433-
2434- def test_empty(self):
2435- self.assertIs(None, ContainsNoVfsCalls().match([]))
2436-
2437- def test_no_vfs_calls(self):
2438- calls = [self._make_call("Branch.get_config_file", [])]
2439- self.assertIs(None, ContainsNoVfsCalls().match(calls))
2440-
2441- def test_ignores_unknown(self):
2442- calls = [self._make_call("unknown", [])]
2443- self.assertIs(None, ContainsNoVfsCalls().match(calls))
2444-
2445- def test_match(self):
2446- calls = [self._make_call(b"append", [b"file"]),
2447- self._make_call(b"Branch.get_config_file", [])]
2448- mismatch = ContainsNoVfsCalls().match(calls)
2449- self.assertIsNot(None, mismatch)
2450- self.assertEqual([calls[0].call], mismatch.vfs_calls)
2451- self.assertIn(mismatch.describe(), [
2452- "no VFS calls expected, got: b'append'(b'file')",
2453- "no VFS calls expected, got: append('file')"])
2454-
2455-
2456 class TestRevisionHistoryMatches(TestCaseWithTransport):
2457
2458 def test_empty(self):
2459
2460=== modified file 'breezy/tests/test_selftest.py'
2461--- breezy/tests/test_selftest.py 2020-02-07 02:14:30 +0000
2462+++ breezy/tests/test_selftest.py 2020-06-11 01:55:28 +0000
2463@@ -541,7 +541,7 @@
2464 self.assertIsSameRealPath(self.test_home_dir, os.environ['HOME'])
2465
2466 def test_assertEqualStat_equal(self):
2467- from .test_dirstate import _FakeStat
2468+ from ..bzr.tests.test_dirstate import _FakeStat
2469 self.build_tree(["foo"])
2470 real = os.lstat("foo")
2471 fake = _FakeStat(real.st_size, real.st_mtime, real.st_ctime,
2472
2473=== modified file 'breezy/tests/test_server.py'
2474--- breezy/tests/test_server.py 2020-02-07 02:14:30 +0000
2475+++ breezy/tests/test_server.py 2020-06-11 01:55:28 +0000
2476@@ -246,10 +246,6 @@
2477
2478 class TestThread(cethread.CatchingExceptionThread):
2479
2480- if not getattr(cethread.CatchingExceptionThread, 'is_alive', None):
2481- def is_alive(self):
2482- return self.isAlive()
2483-
2484 def join(self, timeout=5):
2485 """Overrides to use a default timeout.
2486
2487
2488=== modified file 'breezy/tests/test_tag.py'
2489--- breezy/tests/test_tag.py 2020-02-18 02:17:28 +0000
2490+++ breezy/tests/test_tag.py 2020-06-11 01:55:28 +0000
2491@@ -25,32 +25,12 @@
2492 DisabledTags,
2493 MemoryTags,
2494 )
2495-from breezy.bzr.tag import (
2496- BasicTags,
2497- )
2498 from breezy.tests import (
2499 TestCase,
2500 TestCaseWithTransport,
2501 )
2502
2503
2504-class TestTagSerialization(TestCase):
2505-
2506- def test_tag_serialization(self):
2507- """Test the precise representation of tag dicts."""
2508- # Don't change this after we commit to this format, as it checks
2509- # that the format is stable and compatible across releases.
2510- #
2511- # This release stores them in bencode as a dictionary from name to
2512- # target.
2513- store = BasicTags(branch=None)
2514- td = dict(stable=b'stable-revid', boring=b'boring-revid')
2515- packed = store._serialize_tag_dict(td)
2516- expected = br'd6:boring12:boring-revid6:stable12:stable-revide'
2517- self.assertEqualDiff(packed, expected)
2518- self.assertEqual(store._deserialize_tag_dict(packed), td)
2519-
2520-
2521 class TestTagRevisionRenames(TestCaseWithTransport):
2522
2523 def make_branch_supporting_tags(self, relpath):
2524
2525=== modified file 'breezy/tests/test_upstream_import.py'
2526--- breezy/tests/test_upstream_import.py 2018-11-12 01:41:38 +0000
2527+++ breezy/tests/test_upstream_import.py 2020-06-11 01:55:28 +0000
2528@@ -26,7 +26,7 @@
2529 revision as _mod_revision,
2530 transform
2531 )
2532-from ..bzr.bzrdir import BzrDir
2533+from ..controldir import ControlDir
2534 from ..export import export
2535 from ..upstream_import import (
2536 common_directory,
2537@@ -222,7 +222,7 @@
2538
2539 def archive_test(self, builder, importer, subdir=False):
2540 archive_file = self.make_archive(builder, subdir)
2541- tree = BzrDir.create_standalone_workingtree('tree')
2542+ tree = ControlDir.create_standalone_workingtree('tree')
2543 with tree.lock_write():
2544 importer(tree, archive_file)
2545 self.assertTrue(tree.is_versioned('README'))
2546@@ -244,19 +244,19 @@
2547
2548 def test_untar2(self):
2549 tar_file = self.make_messed_tar()
2550- tree = BzrDir.create_standalone_workingtree('tree')
2551+ tree = ControlDir.create_standalone_workingtree('tree')
2552 import_tar(tree, tar_file)
2553 self.assertTrue(tree.is_versioned('project-0.1/README'))
2554
2555 def test_untar_gzip(self):
2556 tar_file = self.make_tar(mode='w:gz')
2557- tree = BzrDir.create_standalone_workingtree('tree')
2558+ tree = ControlDir.create_standalone_workingtree('tree')
2559 import_tar(tree, tar_file)
2560 self.assertTrue(tree.is_versioned('README'))
2561
2562 def test_no_crash_with_bzrdir(self):
2563 tar_file = self.make_tar_with_bzrdir()
2564- tree = BzrDir.create_standalone_workingtree('tree')
2565+ tree = ControlDir.create_standalone_workingtree('tree')
2566 import_tar(tree, tar_file)
2567 # So long as it did not crash, that should be ok
2568
2569
2570=== modified file 'breezy/tests/test_wsgi.py'
2571--- breezy/tests/test_wsgi.py 2020-02-07 02:14:30 +0000
2572+++ breezy/tests/test_wsgi.py 2020-06-11 01:55:28 +0000
2573@@ -282,7 +282,7 @@
2574 response_bytes = self.read_response(iterable)
2575 self.assertEqual('200 OK', self.status)
2576 # expect a successful response, rather than a jail break error
2577- from breezy.tests.test_smart_transport import LoggingMessageHandler
2578+ from breezy.bzr.tests.test_smart_transport import LoggingMessageHandler
2579 message_handler = LoggingMessageHandler()
2580 decoder = protocol.ProtocolThreeDecoder(
2581 message_handler, expect_version_marker=True)
2582
2583=== modified file 'breezy/transport/http/__init__.py'
2584--- breezy/transport/http/__init__.py 2020-06-01 19:35:12 +0000
2585+++ breezy/transport/http/__init__.py 2020-06-11 01:55:28 +0000
2586@@ -1700,8 +1700,9 @@
2587 403,
2588 404, # Not found
2589 405, # Method not allowed
2590- 416,
2591- 422,
2592+ 409, # Conflict
2593+ 416, # Range not satisfiable
2594+ 422, # Unprocessible entity
2595 501, # Not implemented
2596 ]
2597 """The error codes the caller will handle.
2598@@ -1900,9 +1901,14 @@
2599
2600 @property
2601 def text(self):
2602+ if self.status == 204:
2603+ return None
2604 charset = cgi.parse_header(
2605 self._actual.headers['Content-Type'])[1].get('charset')
2606- return self.data.decode(charset)
2607+ if charset:
2608+ return self.data.decode(charset)
2609+ else:
2610+ return self.data.decode()
2611
2612 def read(self, amt=None):
2613 return self._actual.read(amt)
2614
2615=== modified file 'breezy/transport/http/response.py'
2616--- breezy/transport/http/response.py 2020-02-18 01:57:45 +0000
2617+++ breezy/transport/http/response.py 2020-06-11 01:55:28 +0000
2618@@ -78,6 +78,11 @@
2619 self._pos += len(data)
2620 return data
2621
2622+ def readlines(self, size=None):
2623+ data = self._file.readlines()
2624+ self._pos += sum(map(len, data))
2625+ return data
2626+
2627 def __iter__(self):
2628 while True:
2629 line = self.readline()
2630
2631=== modified file 'doc/developers/releasing.txt'
2632--- doc/developers/releasing.txt 2020-06-01 19:35:12 +0000
2633+++ doc/developers/releasing.txt 2020-06-11 01:55:28 +0000
2634@@ -180,8 +180,8 @@
2635 The process for releasing an alpha release is therefore:
2636 - upload a tarball to launchpad,
2637 - upload a tarball to pypi,
2638-- mail bazaar@lists.ubuntu.com,
2639-- post an announcement on the home page.
2640+- mail bazaar@lists.ubuntu.com,breezy-vcs@googlegroups.com
2641+- post an announcement on the home page.
2642
2643 Uploading tarballs are described below, just use alpha versions (3, 0, 0,
2644 'alpha', 1) in ``./breezy/__init__.py``
2645
2646=== modified file 'setup.py'
2647--- setup.py 2020-06-01 19:35:12 +0000
2648+++ setup.py 2020-06-11 01:55:28 +0000
2649@@ -78,6 +78,8 @@
2650 },
2651 'tests_require': [
2652 'testtools',
2653+ 'testtools<=2.4.0;python_version<"3.0"',
2654+ 'python-subunit',
2655 ],
2656 }
2657

Subscribers

People subscribed via source and target branches