mercurial/hg.py
changeset 45847 d68618954ade
parent 45605 00402df57db7
child 45942 89a2afe31e82
equal deleted inserted replaced
45846:96ca817ec192 45847:d68618954ade
   681 
   681 
   682     dest = util.urllocalpath(dest)
   682     dest = util.urllocalpath(dest)
   683     source = util.urllocalpath(source)
   683     source = util.urllocalpath(source)
   684 
   684 
   685     if not dest:
   685     if not dest:
   686         raise error.Abort(_(b"empty destination path is not valid"))
   686         raise error.InputError(_(b"empty destination path is not valid"))
   687 
   687 
   688     destvfs = vfsmod.vfs(dest, expandpath=True)
   688     destvfs = vfsmod.vfs(dest, expandpath=True)
   689     if destvfs.lexists():
   689     if destvfs.lexists():
   690         if not destvfs.isdir():
   690         if not destvfs.isdir():
   691             raise error.Abort(_(b"destination '%s' already exists") % dest)
   691             raise error.InputError(_(b"destination '%s' already exists") % dest)
   692         elif destvfs.listdir():
   692         elif destvfs.listdir():
   693             raise error.Abort(_(b"destination '%s' is not empty") % dest)
   693             raise error.InputError(_(b"destination '%s' is not empty") % dest)
   694 
   694 
   695     createopts = {}
   695     createopts = {}
   696     narrow = False
   696     narrow = False
   697 
   697 
   698     if storeincludepats is not None:
   698     if storeincludepats is not None: