Submitter | Chinmay Joshi |
---|---|
Date | June 21, 2014, 10:27 a.m. |
Message ID | <b7ac0fd7c56b1e160469.1403346472@genesis> |
Download | mbox | patch |
Permalink | /patch/5030/ |
State | Accepted |
Commit | 62cc4055c6c81ca6ecd4ea6d288e6eca2626699e |
Headers | show |
Comments
Patch
diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -311,8 +311,10 @@ if not dest: raise util.Abort(_("empty destination path is not valid")) - if os.path.exists(dest): - if not os.path.isdir(dest): + + destvfs = scmutil.vfs(dest, expandpath=True) + if destvfs.lexists(): + if not destvfs.isdir(): raise util.Abort(_("destination '%s' already exists") % dest) elif os.listdir(dest): raise util.Abort(_("destination '%s' is not empty") % dest)