~bzr/ubuntu/hardy/bzr/bzr-ppa

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Max Bowsher
  • Date: 2011-07-17 23:30:45 UTC
  • mfrom: (76.3.42 karmic)
  • Revision ID: _@maxb.eu-20110717233045-n093joucqnux0sq8
Tags: 2.3.4-0~bazaar1~hardy1
MergeĀ 2.3.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
3216
3216
        self.hpss_calls = []
3217
3217
        remote_branch.copy_content_into(local)
3218
3218
        self.assertFalse('Branch.revision_history' in self.hpss_calls)
 
3219
 
 
3220
 
 
3221
class TestUpdateBoundBranch(tests.TestCaseWithTransport):
 
3222
 
 
3223
    def test_bug_786980(self):
 
3224
        self.transport_server = test_server.SmartTCPServer_for_testing
 
3225
        wt = self.make_branch_and_tree('master')
 
3226
        checkout = wt.branch.create_checkout('checkout')
 
3227
        wt.commit('add stuff')
 
3228
        last_revid = wt.commit('even more stuff')
 
3229
        bound_location = checkout.branch.get_bound_location()
 
3230
        # For unclear reasons some users have a bound_location without a final
 
3231
        # '/', simulate that by forcing such a value
 
3232
        self.assertEndsWith(bound_location, '/')
 
3233
        new_location = bound_location.rstrip('/')
 
3234
        checkout.branch.set_bound_location(new_location)
 
3235
        # bug 786980 was raising ReadOnlyError: A write attempt was made in a
 
3236
        # read only transaction during the update()
 
3237
        checkout.update()
 
3238
        self.assertEquals(last_revid, checkout.last_revision())