debuglock: ignore ENOENT error when unlocking
This is consistent with the main `lock.release` code.
Differential Revision: https://phab.mercurial-scm.org/D12481
--- a/mercurial/debugcommands.py Wed Apr 06 18:50:20 2022 +0200
+++ b/mercurial/debugcommands.py Wed Apr 06 18:39:15 2022 +0200
@@ -2148,9 +2148,9 @@
"""
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