# HG changeset patch # User Pierre-Yves David # Date 2022-04-06 16:39:15 # Node ID 020378f32d5781648c640a1a8c27b7b3a7754084 # Parent c827bb7b580608511909125121866efb0c33cc93 debuglock: ignore ENOENT error when unlocking This is consistent with the main `lock.release` code. Differential Revision: https://phab.mercurial-scm.org/D12481 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -2148,9 +2148,9 @@ def debuglocks(ui, repo, **opts): """ if opts.get('force_free_lock'): - repo.svfs.unlink(b'lock') + repo.svfs.tryunlink(b'lock') if opts.get('force_free_wlock'): - repo.vfs.unlink(b'wlock') + repo.vfs.tryunlink(b'wlock') if opts.get('force_free_lock') or opts.get('force_free_wlock'): return 0