mercurial/cmdutil.py
changeset 44807 16596f5e1afa
parent 44805 02bf61bb4a70
child 44856 b7808443ed6a
--- a/mercurial/cmdutil.py	Wed May 06 11:41:37 2020 -0700
+++ b/mercurial/cmdutil.py	Wed May 06 11:40:17 2020 -0700
@@ -1552,6 +1552,8 @@
             for abs, rel, exact in srcs:
                 copylist.append(abs)
 
+        if not copylist:
+            raise error.Abort(_(b'no files to copy'))
         # TODO: Add support for `hg cp --at-rev . foo bar dir` and
         # `hg cp --at-rev . dir1 dir2`, preferably unifying the code with the
         # existing functions below.