~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-17 05:53:21 UTC
  • mfrom: (4301.3.3 append_only_fix)
  • Revision ID: pqm@pqm.ubuntu.com-20090617055321-5t6v2ugwdrjvnrgv
(andrew) Fix 'bzr init --append-revisions-only bzr+ssh://...'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    condition_isinstance,
59
59
    split_suite_by_condition,
60
60
    multiply_tests,
 
61
    KnownFailure,
61
62
    )
62
63
from bzrlib.transport import get_transport, http
63
64
from bzrlib.transport.memory import MemoryTransport
153
154
        r = BzrDir.open_from_transport(t.clone('stackable')).open_repository()
154
155
        self.assertTrue(r._format.supports_external_lookups)
155
156
 
 
157
    def test_remote_branch_set_append_revisions_only(self):
 
158
        # Make a format 1.9 branch, which supports append_revisions_only
 
159
        branch = self.make_branch('branch', format='1.9')
 
160
        config = branch.get_config()
 
161
        branch.set_append_revisions_only(True)
 
162
        self.assertEqual(
 
163
            'True', config.get_user_option('append_revisions_only'))
 
164
        branch.set_append_revisions_only(False)
 
165
        self.assertEqual(
 
166
            'False', config.get_user_option('append_revisions_only'))
 
167
 
 
168
    def test_remote_branch_set_append_revisions_only_upgrade_reqd(self):
 
169
        branch = self.make_branch('branch', format='knit')
 
170
        config = branch.get_config()
 
171
        self.assertRaises(
 
172
            errors.UpgradeRequired, branch.set_append_revisions_only, True)
 
173
 
156
174
 
157
175
class FakeProtocol(object):
158
176
    """Lookalike SmartClientRequestProtocolOne allowing body reading tests."""