[PATCH 07 of 11] debug: use tryunlink

Ryan McElroy rm at fb.com
Tue Mar 21 09:54:29 EDT 2017


# HG changeset patch
# User Ryan McElroy <rmcelroy at fb.com>
# Date 1490104228 25200
#      Tue Mar 21 06:50:28 2017 -0700
# Node ID f0a1b3da14aebe21bb2e5c6f8f9c65e6d2704d28
# Parent  425d04205b98881e04a4f2aa6444a3305cfa51ee
debug: use tryunlink

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -794,7 +794,7 @@ def debugfsinfo(ui, path="."):
     ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
     ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo')
                                 and 'yes' or 'no'))
-    os.unlink('.debugfsinfo')
+    util.tryunlink('.debugfsinfo')
 
 @command('debuggetbundle',
     [('H', 'head', [], _('id of head node'), _('ID')),


More information about the Mercurial-devel mailing list