/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-21 06:03:07 UTC
  • mfrom: (4665.7.3 serve-init)
  • Revision ID: pqm@pqm.ubuntu.com-20091221060307-uvja3vdy1o6dzzy0
(mbp) example debian init script

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
        # upwards without agreement from bzr's network support maintainers.
254
254
        self.assertLength(11, self.hpss_calls)
255
255
 
 
256
    def test_push_smart_incremental_acceptance(self):
 
257
        self.setup_smart_server_with_call_log()
 
258
        t = self.make_branch_and_tree('from')
 
259
        rev_id1 = t.commit(allow_pointless=True, message='first commit')
 
260
        rev_id2 = t.commit(allow_pointless=True, message='second commit')
 
261
        self.run_bzr(
 
262
            ['push', self.get_url('to-one'), '-r1'], working_dir='from')
 
263
        self.reset_smart_call_log()
 
264
        self.run_bzr(['push', self.get_url('to-one')], working_dir='from')
 
265
        # This figure represent the amount of work to perform this use case. It
 
266
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
267
        # being too low. If rpc_count increases, more network roundtrips have
 
268
        # become necessary for this use case. Please do not adjust this number
 
269
        # upwards without agreement from bzr's network support maintainers.
 
270
        self.assertLength(11, self.hpss_calls)
 
271
 
256
272
    def test_push_smart_with_default_stacking_url_path_segment(self):
257
273
        # If the default stacked-on location is a path element then branches
258
274
        # we push there over the smart server are stacked and their
319
335
        # The push should have created target/a
320
336
        self.failUnlessExists('target/a')
321
337
 
 
338
    def test_push_use_existing_into_empty_bzrdir(self):
 
339
        """'bzr push --use-existing-dir' into a dir with an empty .bzr dir
 
340
        fails.
 
341
        """
 
342
        tree = self.create_simple_tree()
 
343
        self.build_tree(['target/', 'target/.bzr/'])
 
344
        self.run_bzr_error(
 
345
            ['Target directory ../target already contains a .bzr directory, '
 
346
             'but it is not valid.'],
 
347
            'push ../target --use-existing-dir', working_dir='tree')
 
348
 
322
349
    def test_push_onto_repo(self):
323
350
        """We should be able to 'bzr push' into an existing bzrdir."""
324
351
        tree = self.create_simple_tree()
679
706
 
680
707
    def setUp(self):
681
708
        super(TestPushStrictWithChanges, self).setUp()
 
709
        # Apply the changes defined in load_tests: one of _uncommitted_changes,
 
710
        # _pending_merges or _out_of_sync_trees
682
711
        getattr(self, self._changes_type)()
683
712
 
684
713
    def _uncommitted_changes(self):