At http://people.ubuntu.com/~robertc/baz2.0/push.roundtrips
------------------------------------------------------------ revno: 4049 revision-id: [email protected] parent: [email protected] committer: Robert Collins <[email protected]> branch nick: push.roundtrips timestamp: Wed 2009-02-25 16:36:18 +1100 message: Stop trying to create working trees during clone when the target bzrdir cannot have a local abspath created for it. === modified file 'NEWS' --- a/NEWS 2009-02-25 03:22:12 +0000 +++ b/NEWS 2009-02-25 05:36:18 +0000 @@ -93,9 +93,6 @@ a RemoteRepository uses this to stream the operation. (Andrew Bennetts, Robert Collins) - * There is a RemoteSink object which handles pushing to smart servers. - (Andrew Bennetts, Robert Collins) - * ``bzrlib.tests.run_suite`` accepts a runner_class parameter supporting the use of different runners. (Robert Collins) @@ -130,12 +127,19 @@ delta references. The method is ``scan_unvalidated_index``. (Andrew Bennetts, Robert Collins) + * There is a RemoteSink object which handles pushing to smart servers. + (Andrew Bennetts, Robert Collins) + * ``VersionedFiles`` record adapters have had their signature change from ``(record, record.get_bytes_as(record.storage_kind))`` to ``(record)`` reducing excess duplication and allowing adapters to access private data in record to obtain content more efficiently. (Robert Collins) + * We no longer probe to see if we should create a working tree during + clone if we cannot get a local_abspath for the new bzrdir. + (Robert Collins) + bzr 1.12 "1234567890" 2009-02-13 -------------------------------- === modified file 'bzrlib/bzrdir.py' --- a/bzrlib/bzrdir.py 2009-02-24 09:13:04 +0000 +++ b/bzrlib/bzrdir.py 2009-02-25 05:36:18 +0000 @@ -232,11 +232,14 @@ result_branch = local_branch.clone(result, revision_id=revision_id) if repository_policy is not None: repository_policy.configure_branch(result_branch) - if result_repo is None or result_repo.make_working_trees(): - try: + try: + # Cheaper to check if the target is not local, than to try making + # the tree and fail. + result.root_transport.local_abspath('.') + if result_repo is None or result_repo.make_working_trees(): self.open_workingtree().clone(result) - except (errors.NoWorkingTree, errors.NotLocalUrl): - pass + except (errors.NoWorkingTree, errors.NotLocalUrl): + pass return result # TODO: This should be given a Transport, and should chdir up; otherwise === modified file 'bzrlib/tests/blackbox/test_push.py' --- a/bzrlib/tests/blackbox/test_push.py 2009-02-25 05:06:51 +0000 +++ b/bzrlib/tests/blackbox/test_push.py 2009-02-25 05:36:18 +0000 @@ -202,7 +202,7 @@ # being too low. If rpc_count increases, more network roundtrips have # become necessary for this use case. Please do not adjust this number # upwards without agreement from bzr's network support maintainers. - self.assertEqual(28, rpc_count) + self.assertEqual(27, rpc_count) def test_push_smart_stacked_streaming_acceptance(self): self.setup_smart_server_with_call_log() @@ -219,7 +219,7 @@ # being too low. If rpc_count increases, more network roundtrips have # become necessary for this use case. Please do not adjust this number # upwards without agreement from bzr's network support maintainers. - self.assertEqual(55, rpc_count) + self.assertEqual(54, rpc_count) remote = Branch.open('public') self.assertEndsWith(remote.get_stacked_on_url(), '/parent') -- bazaar-commits mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/bazaar-commits
