Patchwork [07,of,11] debug: use tryunlink

login
register
mail settings
Submitter Ryan McElroy
Date March 21, 2017, 1:54 p.m.
Message ID <f0a1b3da14aebe21bb2e.1490104469@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/19523/
State Accepted
Headers show

Comments

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

Patch

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')),