Patchwork [1,of,4] lock message: implement host property for lock class

login
register
mail settings
Submitter Tuli Uchitel
Date March 8, 2016, 8:50 p.m.
Message ID <9fb33594d0e791034812.1457470214@yous-iphone.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/13696/
State Changes Requested
Delegated to: Pierre-Yves David
Headers show

Comments

Tuli Uchitel - March 8, 2016, 8:50 p.m.
# HG changeset patch
# User Tuli Uchitel <tuli@fb.com>
# Date 1457460328 0
#      Tue Mar 08 18:05:28 2016 +0000
# Branch stable
# Node ID 9fb33594d0e791034812adb34e12a4a3ee636418
# Parent  ea389970c08449440587712117f178d33bab3f1e
lock message: implement host property for lock class

provide a clean way to read the host name of a lock instance by external modules
Pierre-Yves David - March 10, 2016, 3:01 p.m.
On 03/08/2016 08:50 PM, Tuli Uchitel wrote:
> # HG changeset patch
> # User Tuli Uchitel <tuli@fb.com>
> # Date 1457460328 0
> #      Tue Mar 08 18:05:28 2016 +0000
> # Branch stable
> # Node ID 9fb33594d0e791034812adb34e12a4a3ee636418
> # Parent  ea389970c08449440587712117f178d33bab3f1e
> lock message: implement host property for lock class
>
> provide a clean way to read the host name of a lock instance by external modules

test-check-commit.t complains about this description. Please run all the 
tests before submitting a patch.

Patch

diff --git a/mercurial/lock.py b/mercurial/lock.py
--- a/mercurial/lock.py
+++ b/mercurial/lock.py
@@ -39,6 +39,10 @@ 
 
     _host = None
 
+    @property
+    def host(self):
+        return lock._host
+
     def __init__(self, vfs, file, timeout=-1, releasefn=None, acquirefn=None,
                  desc=None, inheritchecker=None, parentlock=None):
         self.vfs = vfs