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

login
register
mail settings
Submitter Chinmay Joshi
Date June 16, 2014, 4:39 p.m.
Message ID <fd04c95539e530df23f2.1402936786@genesis>
Download mbox | patch
Permalink /patch/5010/
State Superseded
Commit becb61de90a1a0384af535a393fb32e7da7a9059
Headers show

Comments

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

Patch

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