Patchwork [1,of,2,STABLE] debuglock: access the lock file using the proper vfs

login
register
mail settings
Submitter Pierre-Yves David
Date April 20, 2015, 2:15 p.m.
Message ID <76235b47af463ebd0979.1429539303@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/8744/
State Accepted
Headers show

Comments

Pierre-Yves David - April 20, 2015, 2:15 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1429538732 -7200
#      Mon Apr 20 16:05:32 2015 +0200
# Branch stable
# Node ID 76235b47af463ebd0979f3ecb0bca2731325606f
# Parent  8d7d0bf62f9f84fef087c07eef505d5cd5b4c602
debuglock: access the lock file using the proper vfs

Before this fix, 'wlock' was always reported as "free" because '.hg/store/wlock'
have never been a thing.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2482,11 +2482,11 @@  def debuglocks(ui, repo, **opts):
 
         if l:
             l.release()
         else:
             try:
-                stat = repo.svfs.lstat(name)
+                stat = vfs.lstat(name)
                 age = now - stat.st_mtime
                 user = util.username(stat.st_uid)
                 locker = vfs.readlock(name)
                 if ":" in locker:
                     host, pid = locker.split(':')