equal
deleted
inserted
replaced
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: |