~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2006-05-03 08:05:05 UTC
  • mfrom: (1624.3.45 bzr.olaf.info)
  • mto: This revision was merged to the branch mainline in revision 1697.
  • Revision ID: mbp@sourcefrog.net-20060503080505-dd3f40f3ee57b137
[merge] bzr info and lock improvements (olaf)

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
        assert cfg.get_option("nickname") == nick
155
155
 
156
156
    nick = property(_get_nick, _set_nick)
157
 
        
 
157
 
 
158
    def is_locked(self):
 
159
        raise NotImplementedError('is_locked is abstract')
 
160
 
158
161
    def lock_write(self):
159
162
        raise NotImplementedError('lock_write is abstract')
160
 
        
 
163
 
161
164
    def lock_read(self):
162
165
        raise NotImplementedError('lock_read is abstract')
163
166
 
168
171
        """Return lock mode for the Branch: 'r', 'w' or None"""
169
172
        raise NotImplementedError(self.peek_lock_mode)
170
173
 
 
174
    def get_physical_lock_status(self):
 
175
        raise NotImplementedError('get_physical_lock_status is abstract')
 
176
 
171
177
    def abspath(self, name):
172
178
        """Return absolute filename for something in the branch
173
179
        
939
945
        tree = self.repository.revision_tree(self.last_revision())
940
946
        return tree.inventory.root.file_id
941
947
 
 
948
    def is_locked(self):
 
949
        return self.control_files.is_locked()
 
950
 
942
951
    def lock_write(self):
943
952
        # TODO: test for failed two phase locks. This is known broken.
944
953
        self.control_files.lock_write()
960
969
        else:
961
970
            return self.control_files._lock_mode
962
971
 
 
972
    def get_physical_lock_status(self):
 
973
        return self.control_files.get_physical_lock_status()
 
974
 
963
975
    @needs_read_lock
964
976
    def print_file(self, file, revision_id):
965
977
        """See Branch.print_file."""