204
204
% tuple(map(urlutils.local_path_to_url, ['from', 'to-two'])))
205
205
self.failUnlessExists('to-two')
207
def test_push_repository_no_branch_doesnt_fetch_all_revs(self):
208
# See https://bugs.launchpad.net/bzr/+bug/465517
209
target_repo = self.make_repository('target')
210
source = self.make_branch_builder('source')
211
source.start_series()
212
source.build_snapshot('A', None, [
213
('add', ('', 'root-id', 'directory', None))])
214
source.build_snapshot('B', ['A'], [])
215
source.build_snapshot('C', ['A'], [])
216
source.finish_series()
217
self.run_bzr('push target -d source')
218
self.addCleanup(target_repo.lock_read().unlock)
219
# We should have pushed 'C', but not 'B', since it isn't in the
221
self.assertEqual([('A',), ('C',)], sorted(target_repo.revisions.keys()))
207
223
def test_push_smart_non_stacked_streaming_acceptance(self):
208
224
self.setup_smart_server_with_call_log()
209
225
t = self.make_branch_and_tree('from')