From patchwork Mon Jun 16 16:39:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6,of,6] hg: update newly added listdir function of vfs in clone From: Chinmay Joshi X-Patchwork-Id: 5010 Message-Id: To: mercurial-devel@selenic.com Date: Mon, 16 Jun 2014 22:09:46 +0530 # HG changeset patch # User Chinmay Joshi # 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