/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_branch.py

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Black-box tests for bzr branch."""
257
257
            err)
258
258
 
259
259
 
 
260
class TestSmartServerBranching(ExternalBase):
 
261
 
 
262
    def test_branch_from_trivial_branch_to_same_server_branch_acceptance(self):
 
263
        self.setup_smart_server_with_call_log()
 
264
        t = self.make_branch_and_tree('from')
 
265
        for count in range(9):
 
266
            t.commit(message='commit %d' % count)
 
267
        self.reset_smart_call_log()
 
268
        out, err = self.run_bzr(['branch', self.get_url('from'),
 
269
            self.get_url('target')])
 
270
        # This figure represent the amount of work to perform this use case. It
 
271
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
272
        # being too low. If rpc_count increases, more network roundtrips have
 
273
        # become necessary for this use case. Please do not adjust this number
 
274
        # upwards without agreement from bzr's network support maintainers.
 
275
        self.assertLength(53, self.hpss_calls)
 
276
 
 
277
    def test_branch_from_trivial_branch_streaming_acceptance(self):
 
278
        self.setup_smart_server_with_call_log()
 
279
        t = self.make_branch_and_tree('from')
 
280
        for count in range(9):
 
281
            t.commit(message='commit %d' % count)
 
282
        self.reset_smart_call_log()
 
283
        out, err = self.run_bzr(['branch', self.get_url('from'),
 
284
            'local-target'])
 
285
        # This figure represent the amount of work to perform this use case. It
 
286
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
287
        # being too low. If rpc_count increases, more network roundtrips have
 
288
        # become necessary for this use case. Please do not adjust this number
 
289
        # upwards without agreement from bzr's network support maintainers.
 
290
        self.assertLength(10, self.hpss_calls)
 
291
 
 
292
    def test_branch_from_trivial_stacked_branch_streaming_acceptance(self):
 
293
        self.setup_smart_server_with_call_log()
 
294
        t = self.make_branch_and_tree('trunk')
 
295
        for count in range(8):
 
296
            t.commit(message='commit %d' % count)
 
297
        tree2 = t.branch.bzrdir.sprout('feature', stacked=True
 
298
            ).open_workingtree()
 
299
        tree2.commit('feature change')
 
300
        self.reset_smart_call_log()
 
301
        out, err = self.run_bzr(['branch', self.get_url('feature'),
 
302
            'local-target'])
 
303
        # This figure represent the amount of work to perform this use case. It
 
304
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
305
        # being too low. If rpc_count increases, more network roundtrips have
 
306
        # become necessary for this use case. Please do not adjust this number
 
307
        # upwards without agreement from bzr's network support maintainers.
 
308
        self.assertLength(15, self.hpss_calls)
 
309
 
260
310
 
261
311
class TestRemoteBranch(TestCaseWithSFTPServer):
262
312