From patchwork Tue Mar 8 20:50:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,4] lock message: calculate lock description file name From: Tuli Uchitel X-Patchwork-Id: 13693 Message-Id: <1ffef024963c56879289.1457470215@yous-iphone.dhcp.thefacebook.com> To: Cc: rmcelroy@fb.com, gigz@fb.com, tienchai@fb.com Date: Tue, 8 Mar 2016 20:50:15 +0000 # HG changeset patch # User Tuli Uchitel # Date 1457463708 0 # Tue Mar 08 19:01:48 2016 +0000 # Branch stable # Node ID 1ffef024963c56879289caf534575d0c72f4b7e9 # Parent 9fb33594d0e791034812adb34e12a4a3ee636418 lock message: calculate lock description file name implement a method that creates a name for a file that will hold description about the lock that has been acquired diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1237,6 +1237,13 @@ continue ce.refresh() + def _getlockdescriptionfilename(self, lockfilepath): + lockdescriptionfilename = None + if isinstance(lockfilepath, basestring): + lockfilename = lockfilepath.split("/")[-1] + lockdescriptionfilename = "%s.description" % lockfilename + return lockdescriptionfilename + def _lock(self, vfs, lockname, wait, releasefn, acquirefn, desc, inheritchecker=None, parentenvvar=None): parentlock = None