hg: update newly added listdir function of vfs in clone
authorChinmay Joshi <c@chinmayjoshi.com>
Sat, 21 Jun 2014 14:49:49 +0530
changeset 21804 becb61de90a1
parent 21803 62cc4055c6c8
child 21805 23f3241406ff
hg: update newly added listdir function of vfs in clone This change invokes os.listdir() via newly added vfs function in clone.
mercurial/hg.py
--- a/mercurial/hg.py	Sat Jun 21 14:44:09 2014 +0530
+++ b/mercurial/hg.py	Sat Jun 21 14:49:49 2014 +0530
@@ -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