diff -r edf2d83a11aa -r a218ba5f60df mercurial/hg.py --- a/mercurial/hg.py Sun Mar 29 19:56:53 2009 -0300 +++ b/mercurial/hg.py Sun Mar 29 16:15:06 2009 -0500 @@ -131,7 +131,10 @@ source = localpath(source) if os.path.exists(dest): - raise util.Abort(_("destination '%s' already exists") % dest) + if not os.path.isdir(dest): + raise util.Abort(_("destination '%s' already exists") % dest) + elif os.listdir(dest): + raise util.Abort(_("destination '%s' is not empty") % dest) class DirCleanup(object): def __init__(self, dir_):