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

Chinmay Joshi c at chinmayjoshi.com
Sat Jun 21 05:27:53 CDT 2014


# HG changeset patch
# User Chinmay Joshi <c at chinmayjoshi.com>
# Date 1403342389 -19800
#      Sat Jun 21 14:49:49 2014 +0530
# Node ID 911b2ae39ad6c13fa029915acb82b25321fc54b6
# Parent  b7ac0fd7c56b1e16046960482ed7871a4799fc4a
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
@@ -316,7 +316,7 @@
     if destvfs.lexists():
         if not destvfs.isdir():
             raise util.Abort(_("destination '%s' already exists") % dest)
-        elif os.listdir(dest):
+        elif destvfs.listdir():
             raise util.Abort(_("destination '%s' is not empty") % dest)
 
     srclock = destlock = cleandir = None


More information about the Mercurial-devel mailing list