[PATCH 1 of 4] lock message: implement host property for lock class
Tuli Uchitel
tuli at fb.com
Tue Mar 8 20:50:14 UTC 2016
# HG changeset patch
# User Tuli Uchitel <tuli at 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
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
More information about the Mercurial-devel
mailing list