1787
1788
branch = self.prepare_stacked_remote_branch()
1788
1789
repo = branch.repository
1789
1790
self.assertEqual([], repo._get_parent_map(['rev1']).keys())
1793
class TestRemoteBranchEffort(tests.TestCaseWithTransport):
1796
super(TestRemoteBranchEffort, self).setUp()
1797
# Create a smart server that publishes whatever the backing VFS server
1799
self.smart_server = server.SmartTCPServer_for_testing()
1800
self.smart_server.setUp(self.get_server())
1801
self.addCleanup(self.smart_server.tearDown)
1802
# Log all HPSS calls into self.hpss_calls.
1803
_SmartClient.hooks.install_named_hook(
1804
'call', self.capture_hpss_call, None)
1805
self.hpss_calls = []
1807
def capture_hpss_call(self, params):
1808
self.hpss_calls.append(params.method)
1810
def test_copy_content_into_avoids_revision_history(self):
1811
local = self.make_branch('local')
1812
remote_backing_tree = self.make_branch_and_tree('remote')
1813
remote_backing_tree.commit("Commit.")
1814
remote_branch_url = self.smart_server.get_url() + 'remote'
1815
remote_branch = bzrdir.BzrDir.open(remote_branch_url).open_branch()
1816
local.repository.fetch(remote_branch.repository)
1817
self.hpss_calls = []
1818
remote_branch.copy_content_into(local)
1819
self.assertFalse('Branch.revision_history' in self.hpss_calls)