mercurial/debugcommands.py
branchstable
changeset 48835 020378f32d57
parent 48705 b4bc9c4f925d
child 48849 eaaf4f98c9f1
child 49139 ea98850a136e
--- 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