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

login
register
mail settings
Submitter Chinmay Joshi
Date June 16, 2014, 4:39 p.m.
Message ID <986e8fb82923f864c10b.1402936781@genesis>
Download mbox | patch
Permalink /patch/5005/
State Superseded
Commit dfacdd6a111e9b3960bfa8364818645951fa3e07
Headers show

Comments

Chinmay Joshi - June 16, 2014, 4:39 p.m.
# HG changeset patch
# User Chinmay Joshi <c@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().

Patch

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)