/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""On-disk mutex protecting a resource
18
18
 
325
325
            self._trace("... unlock succeeded after %dms",
326
326
                    (time.time() - start_time) * 1000)
327
327
            result = lock.LockResult(self.transport.abspath(self.path),
328
 
                old_nonce)
 
328
                                     old_nonce)
329
329
            for hook in self.hooks['lock_released']:
330
330
                hook(result)
331
331
 
379
379
            raise LockBreakMismatch(self, broken_info, dead_holder_info)
380
380
        self.transport.delete(broken_info_path)
381
381
        self.transport.rmdir(tmpname)
 
382
        result = lock.LockResult(self.transport.abspath(self.path),
 
383
                                 current_info.get('nonce'))
 
384
        for hook in self.hooks['lock_broken']:
 
385
            hook(result)
382
386
 
383
387
    def _check_not_locked(self):
384
388
        """If the lock is held by this instance, raise an error."""