~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.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:
91
91
        This should normally be called only when the LockableFiles directory
92
92
        is first created on disk.
93
93
        """
94
 
        self._lock.create()
 
94
        self._lock.create(mode=self._dir_mode)
95
95
 
96
96
    def __repr__(self):
97
97
        return '%s(%r)' % (self.__class__.__name__,
306
306
        self._lock.unlock()
307
307
        self._lock = None
308
308
 
309
 
    def create(self):
 
309
    def create(self, mode=None):
310
310
        """Create lock mechanism"""
311
311
        # for old-style locks, create the file now
312
312
        self._transport.put(self._escaped_name, StringIO(),