mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
dfda82e492
Summary: Mostly empty lines removed and added. A few bugfixes on excessive line splitting. Reviewed By: quark-zju Differential Revision: D8199128 fbshipit-source-id: 90c1616061bfd7cfbba0b75f03f89683340374d5
20 lines
476 B
Python
20 lines
476 B
Python
# Dummy extension that throws if lock is taken
|
|
#
|
|
# This extension can be used to test that lock is not taken when it's not
|
|
# supposed to
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from mercurial import error
|
|
|
|
|
|
def reposetup(ui, repo):
|
|
class faillockrepo(repo.__class__):
|
|
def lock(self, wait=True):
|
|
raise error.Abort("lock is taken!")
|
|
|
|
def wlock(self, wait=True):
|
|
raise error.Abort("lock is taken!")
|
|
|
|
repo.__class__ = faillockrepo
|