[PATCH 1 of 6] vfs: add listdir for os.listdir in vfs

Chinmay Joshi c at chinmayjoshi.com
Mon Jun 16 11:39:41 CDT 2014


# HG changeset patch
# User Chinmay Joshi <c at chinmayjoshi.com>
# Date 1402929207 -19800
#      Mon Jun 16 20:03:27 2014 +0530
# Node ID 986e8fb82923f864c10bfb5a97d0594e83722b9c
# Parent  c00822e0b8ea4b5b3765539002b8991b8d9c3dc6
vfs: add listdir for os.listdir in vfs

This patch adds listdir() in vfs to use os.listdir().

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -184,6 +184,9 @@
     def lstat(self, path=None):
         return os.lstat(self.join(path))
 
+    def listdir(self, path=None):
+        return os.listdir(self.join(path))
+
     def makedir(self, path=None, notindexed=True):
         return util.makedir(self.join(path), notindexed)
 


More information about the Mercurial-devel mailing list