Patchwork [6,of,7,VFS] vfs: add removedirs

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 10, 2015, 3:54 p.m.
Message ID <2316afa88e37a93d3455.1428681268@juju>
Download mbox | patch
Permalink /patch/8598/
State Accepted
Commit 0d28b0df77ea6d320b6cbc9b2695427516964d9b
Headers show

Comments

Katsunori FUJIWARA - April 10, 2015, 3:54 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1428680829 -32400
#      Sat Apr 11 00:47:09 2015 +0900
# Node ID 2316afa88e37a93d3455d30d38dbe4fe994034cd
# Parent  633efbe1f1f387191d2633c83f2159c116f0143c
vfs: add removedirs

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -316,6 +316,11 @@  class abstractvfs(object):
     def readlink(self, path):
         return os.readlink(self.join(path))
 
+    def removedirs(self, path=None):
+        """Remove a leaf directory and all empty intermediate ones
+        """
+        return util.removedirs(self.join(path))
+
     def rmtree(self, path=None, ignore_errors=False, forcibly=False):
         """Remove a directory tree recursively