Patchwork [1,of,2,V2] vfs: add unlinkpath to vfs

login
register
mail settings
Submitter Chinmay Joshi
Date June 5, 2014, 10:46 a.m.
Message ID <03dfb48d6b03dd6129f1.1401965167@ubuntu>
Download mbox | patch
Permalink /patch/4934/
State Accepted
Headers show

Comments

Chinmay Joshi - June 5, 2014, 10:46 a.m.
# HG changeset patch
# User Chinmay Joshi <c@chinmayjoshi.com>
# Date 1401961604 -19800
#      Thu Jun 05 15:16:44 2014 +0530
# Node ID 03dfb48d6b03dd6129f19be65b3e95534dfbb96f
# Parent  99db956b88ab699644c99095fecadbc4c83adbfc
vfs: add unlinkpath to vfs

This patch adds unlinkpath() function in vfs to replace util.unlinkpath().

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -226,6 +226,9 @@ 
     def unlink(self, path=None):
         return util.unlink(self.join(path))
 
+    def unlinkpath(self, path=None, ignoremissing=False):
+        return util.unlinkpath(self.join(path), ignoremissing)
+
     def utime(self, path=None, t=None):
         return os.utime(self.join(path), t)