[PATCH 6 of 6] hg: update newly added listdir function of vfs in clone

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


# HG changeset patch
# User Chinmay Joshi <c at chinmayjoshi.com>
# Date 1402933578 -19800
#      Mon Jun 16 21:16:18 2014 +0530
# Node ID fd04c95539e530df23f24744036bdba21f4c89b5
# Parent  9dc6f43b60b2ce035846ca2fbe2f579418d2128d
hg: update newly added listdir function of vfs in clone

This change invokes os.listdir() via newly added vfs function in clone.

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -315,7 +315,7 @@
     if dstvfs.lexists():
         if not dstvfs.isdir():
             raise util.Abort(_("destination '%s' already exists") % dest)
-        elif os.listdir(dest):
+        elif dstvfs.listdir():
             raise util.Abort(_("destination '%s' is not empty") % dest)
 
     srclock = destlock = cleandir = None


More information about the Mercurial-devel mailing list