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

Merge hpss-get-physical-lock-status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1372
1372
 
1373
1373
    def get_physical_lock_status(self):
1374
1374
        """See Repository.get_physical_lock_status()."""
1375
 
        # should be an API call to the server.
1376
 
        self._ensure_real()
1377
 
        return self._real_repository.get_physical_lock_status()
 
1375
        path = self.bzrdir._path_for_remote_call(self._client)
 
1376
        try:
 
1377
            response = self._call('Repository.get_physical_lock_status', path)
 
1378
        except errors.UnknownSmartMethod:
 
1379
            self._ensure_real()
 
1380
            return self._real_repository.get_physical_lock_status()
 
1381
        if response[0] not in ('yes', 'no'):
 
1382
            raise errors.UnexpectedSmartServerResponse(response)
 
1383
        return (response[0] == 'yes')
1378
1384
 
1379
1385
    def is_in_write_group(self):
1380
1386
        """Return True if there is an open write group.
2942
2948
 
2943
2949
    def get_physical_lock_status(self):
2944
2950
        """See Branch.get_physical_lock_status()."""
2945
 
        # should be an API call to the server, as branches must be lockable.
2946
 
        self._ensure_real()
2947
 
        return self._real_branch.get_physical_lock_status()
 
2951
        try:
 
2952
            response = self._client.call('Branch.get_physical_lock_status',
 
2953
                self._remote_path())
 
2954
        except errors.UnknownSmartMethod:
 
2955
            self._ensure_real()
 
2956
            return self._real_branch.get_physical_lock_status()
 
2957
        if response[0] not in ('yes', 'no'):
 
2958
            raise errors.UnexpectedSmartServerResponse(response)
 
2959
        return (response[0] == 'yes')
2948
2960
 
2949
2961
    def get_stacked_on_url(self):
2950
2962
        """Get the URL this branch is stacked against.