Patchwork [1,of,4,marmoute-reviewed] localrepo: add a note about parentenvvar

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 5, 2015, 3:23 a.m.
Message ID <6c6d3c21524e6154db6c.1444015391@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10805/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 5, 2015, 3:23 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444012123 25200
#      Sun Oct 04 19:28:43 2015 -0700
# Node ID 6c6d3c21524e6154db6c4f4816d345986f24dc9b
# Parent  9b8d1fa002d28bbce5f9a23f6210bee326e457cb
localrepo: add a note about parentenvvar

Review feedback from Pierre-Yves David.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1214,6 +1214,8 @@  class localrepository(object):
     def _lock(self, vfs, lockname, wait, releasefn, acquirefn, desc,
               parentenvvar=None):
         parentlock = None
+        # the contents of parentenvvar are used by the underlying lock to
+        # determine whether it can be inherited
         if parentenvvar is not None:
             parentlock = os.environ.get(parentenvvar)
         try: