Mercurial > hg
comparison tests/test-fncache.t @ 26475:efd57cd6fd1d
localrepo: allow wlock to be inherited
This is part of a series that will allow locks to be inherited by subprocesses
in limited circumstances.
When allowed, the parent process will pass down requisite information to the
child process by way of this environment variable.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 25 Sep 2015 12:39:23 -0700 |
parents | 3e84f40232c7 |
children | ca778cbe94f3 |
comparison
equal
deleted
inserted
replaced
26474:431094a3b21f | 26475:efd57cd6fd1d |
---|---|
203 $ cat > exceptionext.py <<EOF | 203 $ cat > exceptionext.py <<EOF |
204 > import os | 204 > import os |
205 > from mercurial import commands, util | 205 > from mercurial import commands, util |
206 > from mercurial.extensions import wrapfunction | 206 > from mercurial.extensions import wrapfunction |
207 > | 207 > |
208 > def lockexception(orig, vfs, lockname, wait, releasefn, acquirefn, desc): | 208 > def lockexception(orig, vfs, lockname, wait, releasefn, acquirefn, desc, parentenvvar=None): |
209 > def releasewrap(): | 209 > def releasewrap(): |
210 > raise util.Abort("forced lock failure") | 210 > raise util.Abort("forced lock failure") |
211 > return orig(vfs, lockname, wait, releasewrap, acquirefn, desc) | 211 > return orig(vfs, lockname, wait, releasewrap, acquirefn, desc) |
212 > | 212 > |
213 > def reposetup(ui, repo): | 213 > def reposetup(ui, repo): |