~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_push.py

  • Committer: Andrew Bennetts
  • Date: 2011-03-23 05:15:48 UTC
  • mfrom: (5609.24.5 2.3)
  • mto: This revision was merged to the branch mainline in revision 5732.
  • Revision ID: andrew.bennetts@canonical.com-20110323051548-rit3h3i274gszs2n
Merge lp:bzr/2.3, including fixes for #465517 and #733350.

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
            % tuple(map(urlutils.local_path_to_url, ['from', 'to-two'])))
205
205
        self.failUnlessExists('to-two')
206
206
 
 
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
 
220
        # ancestry
 
221
        self.assertEqual([('A',), ('C',)], sorted(target_repo.revisions.keys()))
 
222
 
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')