Mercurial > hg
changeset 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 | 431094a3b21f |
children | fffc7416e579 |
files | mercurial/localrepo.py tests/test-fncache.t |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Oct 04 20:04:44 2015 -0700 +++ b/mercurial/localrepo.py Fri Sep 25 12:39:23 2015 -0700 @@ -1296,7 +1296,7 @@ l = self._lock(self.vfs, "wlock", wait, unlock, self.invalidatedirstate, _('working directory of %s') % - self.origroot) + self.origroot, parentenvvar='HG_WLOCK_LOCKER') self._wlockref = weakref.ref(l) return l
--- a/tests/test-fncache.t Sun Oct 04 20:04:44 2015 -0700 +++ b/tests/test-fncache.t Fri Sep 25 12:39:23 2015 -0700 @@ -205,7 +205,7 @@ > from mercurial import commands, util > from mercurial.extensions import wrapfunction > - > def lockexception(orig, vfs, lockname, wait, releasefn, acquirefn, desc): + > def lockexception(orig, vfs, lockname, wait, releasefn, acquirefn, desc, parentenvvar=None): > def releasewrap(): > raise util.Abort("forced lock failure") > return orig(vfs, lockname, wait, releasewrap, acquirefn, desc)