~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

Add Repository.{dont_,}leave_lock_in_place.

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
            raise errors.BzrBadParameterNotString(a_string)
213
213
        self.put(path, StringIO(a_string.encode('utf-8')))
214
214
 
 
215
    def leave_in_place(self):
 
216
        """Set this LockableFiles to not clear the physical lock on unlock."""
 
217
        self._lock.leave_in_place()
 
218
 
 
219
    def dont_leave_in_place(self):
 
220
        """Set this LockableFiles to clear the physical lock on unlock."""
 
221
        # XXX: think about renaming this!
 
222
        self._lock.dont_leave_in_place()
 
223
 
215
224
    def lock_write(self, token=None):
216
225
        """Lock this group of files for writing.
217
226
        
335
344
    def break_lock(self):
336
345
        raise NotImplementedError(self.break_lock)
337
346
 
 
347
    def leave_in_place(self):
 
348
        raise NotImplementedError(self.leave_in_place)
 
349
 
338
350
    def lock_write(self, token=None):
339
351
        if token is not None:
340
352
            raise errors.TokenLockingNotSupported(self)