MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / exclusive_lock

Method exclusive_lock

pre_commit/store.py:104–109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

102
103 @contextlib.contextmanager
104 def exclusive_lock(self) -> Generator[None]:
105 def blocked_cb() -> None: # pragma: no cover (tests are in-process)
106 logger.info('Locking pre-commit directory')
107
108 with file_lock.lock(os.path.join(self.directory, '.lock'), blocked_cb):
109 yield
110
111 @contextlib.contextmanager
112 def connect(

Callers 4

__init__Method · 0.95
_new_repoMethod · 0.95
install_hook_envsFunction · 0.80
_gcFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected