~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2006-05-05 00:44:25 UTC
  • mfrom: (1697 +trunk)
  • mto: (1697.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1701.
  • Revision ID: robertc@robertcollins.net-20060505004425-55597abf11998087
Merge HEAD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
        assert cfg.get_option("nickname") == nick
169
169
 
170
170
    nick = property(_get_nick, _set_nick)
171
 
        
 
171
 
 
172
    def is_locked(self):
 
173
        raise NotImplementedError('is_locked is abstract')
 
174
 
172
175
    def lock_write(self):
173
176
        raise NotImplementedError('lock_write is abstract')
174
 
        
 
177
 
175
178
    def lock_read(self):
176
179
        raise NotImplementedError('lock_read is abstract')
177
180
 
182
185
        """Return lock mode for the Branch: 'r', 'w' or None"""
183
186
        raise NotImplementedError(self.peek_lock_mode)
184
187
 
 
188
    def get_physical_lock_status(self):
 
189
        raise NotImplementedError('get_physical_lock_status is abstract')
 
190
 
185
191
    def abspath(self, name):
186
192
        """Return absolute filename for something in the branch
187
193
        
953
959
        tree = self.repository.revision_tree(self.last_revision())
954
960
        return tree.inventory.root.file_id
955
961
 
 
962
    def is_locked(self):
 
963
        return self.control_files.is_locked()
 
964
 
956
965
    def lock_write(self):
957
966
        # TODO: test for failed two phase locks. This is known broken.
958
967
        self.control_files.lock_write()
976
985
        else:
977
986
            return self.control_files._lock_mode
978
987
 
 
988
    def get_physical_lock_status(self):
 
989
        return self.control_files.get_physical_lock_status()
 
990
 
979
991
    @needs_read_lock
980
992
    def print_file(self, file, revision_id):
981
993
        """See Branch.print_file."""