##// END OF EJS Templates
hg: use vfs functions in clone...
Chinmay Joshi -
r21803:62cc4055 default
parent child Browse files
Show More
@@ -311,8 +311,10 b' def clone(ui, peeropts, source, dest=Non'
311
311
312 if not dest:
312 if not dest:
313 raise util.Abort(_("empty destination path is not valid"))
313 raise util.Abort(_("empty destination path is not valid"))
314 if os.path.exists(dest):
314
315 if not os.path.isdir(dest):
315 destvfs = scmutil.vfs(dest, expandpath=True)
316 if destvfs.lexists():
317 if not destvfs.isdir():
316 raise util.Abort(_("destination '%s' already exists") % dest)
318 raise util.Abort(_("destination '%s' already exists") % dest)
317 elif os.listdir(dest):
319 elif os.listdir(dest):
318 raise util.Abort(_("destination '%s' is not empty") % dest)
320 raise util.Abort(_("destination '%s' is not empty") % dest)
General Comments 0
You need to be logged in to leave comments. Login now