~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-05 08:29:29 UTC
  • mfrom: (1697.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060505082929-a037ee137f1ff240
Merge break-lock command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
290
290
            the working tree has been constructed from.
291
291
            """)
292
292
 
 
293
    def break_lock(self):
 
294
        """Break a lock if one is present from another instance.
 
295
 
 
296
        Uses the ui factory to ask for confirmation if the lock may be from
 
297
        an active process.
 
298
 
 
299
        This will probe the repository for its lock as well.
 
300
        """
 
301
        self._control_files.break_lock()
 
302
        self.branch.break_lock()
 
303
 
293
304
    def _set_inventory(self, inv):
294
305
        self._inventory = inv
295
306
        self.path2id = self._inventory.path2id
1235
1246
             self._control_files._lock_count==3)):
1236
1247
            self._hashcache.write()
1237
1248
        # reverse order of locking.
1238
 
        result = self._control_files.unlock()
1239
1249
        try:
 
1250
            return self._control_files.unlock()
 
1251
        finally:
1240
1252
            self.branch.unlock()
1241
 
        finally:
1242
 
            return result
1243
1253
 
1244
1254
    @needs_write_lock
1245
1255
    def update(self):