~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-07-28 07:05:19 UTC
  • mfrom: (5050.3.15 2.2)
  • mto: (5050.3.16 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: andrew.bennetts@canonical.com-20100728070519-kkflohg6djas3ui4
Merge lp:bzr/2.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from cStringIO import StringIO
20
20
import os
21
21
 
 
22
from testtools.matchers import (
 
23
    Equals,
 
24
    MatchesAny,
 
25
    )
 
26
 
22
27
from bzrlib import (
23
28
    branch,
24
29
    builtins,
39
44
from bzrlib.tests.per_interbranch import (
40
45
    TestCaseWithInterBranch,
41
46
    )
42
 
from bzrlib.transport import get_transport
43
47
from bzrlib.tests import test_server
44
48
 
45
49
 
145
149
        except (errors.IncompatibleFormat, errors.UninitializableFormat):
146
150
            # This Branch format cannot create shared repositories
147
151
            return
148
 
        # This is a little bit trickier because make_branch_and_tree will not
 
152
        # This is a little bit trickier because make_from_branch_and_tree will not
149
153
        # re-use a shared repository.
150
154
        try:
151
155
            a_branch = self.make_from_branch('repo/tree')
272
276
        calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
273
277
        # After inserting the stream the client has no reason to query the
274
278
        # remote graph any further.
275
 
        self.assertEqual(
276
 
            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
277
 
             'get', 'Branch.set_last_revision_info', 'Branch.unlock'],
278
 
            calls_after_insert_stream)
 
279
        bzr_core_trace = Equals(
 
280
            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
 
281
             'get', 'Branch.set_last_revision_info', 'Branch.unlock'])
 
282
        bzr_loom_trace = Equals(
 
283
            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
 
284
             'get', 'Branch.set_last_revision_info', 'get', 'Branch.unlock'])
 
285
        self.assertThat(calls_after_insert_stream,
 
286
            MatchesAny(bzr_core_trace, bzr_loom_trace))
279
287
 
280
288
    def disableOptimisticGetParentMap(self):
281
289
        # Tweak some class variables to stop remote get_parent_map calls asking