comparison mercurial/localrepo.py @ 26472:406a654b41cb

localrepo: add a note about parentenvvar Review feedback from Pierre-Yves David.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 04 Oct 2015 19:28:43 -0700
parents 89b7a7883aee
children efd57cd6fd1d
comparison
equal deleted inserted replaced
26471:41dd7b2c7e15 26472:406a654b41cb
1212 ce.refresh() 1212 ce.refresh()
1213 1213
1214 def _lock(self, vfs, lockname, wait, releasefn, acquirefn, desc, 1214 def _lock(self, vfs, lockname, wait, releasefn, acquirefn, desc,
1215 parentenvvar=None): 1215 parentenvvar=None):
1216 parentlock = None 1216 parentlock = None
1217 # the contents of parentenvvar are used by the underlying lock to
1218 # determine whether it can be inherited
1217 if parentenvvar is not None: 1219 if parentenvvar is not None:
1218 parentlock = os.environ.get(parentenvvar) 1220 parentlock = os.environ.get(parentenvvar)
1219 try: 1221 try:
1220 l = lockmod.lock(vfs, lockname, 0, releasefn=releasefn, 1222 l = lockmod.lock(vfs, lockname, 0, releasefn=releasefn,
1221 acquirefn=acquirefn, desc=desc, 1223 acquirefn=acquirefn, desc=desc,