~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Robert Collins
  • Date: 2006-04-18 22:41:16 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1671.
  • Revision ID: robertc@robertcollins.net-20060418224116-9b723440fa56e404
 * 'Metadir' is now the default disk format. This improves behaviour in
   SFTP using circumstances and allows binding and rebinding and easier
   use of repositories. (Robert Collins, Aaron Bentley).

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
 
172
172
    is_held = property(lambda self: self._lock_held)
173
173
 
174
 
    def create(self):
 
174
    def create(self, mode=None):
175
175
        """Create the on-disk lock.
176
176
 
177
177
        This is typically only called when the object/directory containing the 
179
179
        """
180
180
        if self.transport.is_readonly():
181
181
            raise UnlockableTransport(self.transport)
182
 
        self.transport.mkdir(self.path)
 
182
        self.transport.mkdir(self.path, mode=mode)
183
183
 
184
184
    def attempt_lock(self):
185
185
        """Take the lock; fail if it's already held.