mercurial/cmdutil.py
changeset 44807 16596f5e1afa
parent 44805 02bf61bb4a70
child 44856 b7808443ed6a
equal deleted inserted replaced
44806:8e47b43d665f 44807:16596f5e1afa
  1550             if not srcs:
  1550             if not srcs:
  1551                 continue
  1551                 continue
  1552             for abs, rel, exact in srcs:
  1552             for abs, rel, exact in srcs:
  1553                 copylist.append(abs)
  1553                 copylist.append(abs)
  1554 
  1554 
       
  1555         if not copylist:
       
  1556             raise error.Abort(_(b'no files to copy'))
  1555         # TODO: Add support for `hg cp --at-rev . foo bar dir` and
  1557         # TODO: Add support for `hg cp --at-rev . foo bar dir` and
  1556         # `hg cp --at-rev . dir1 dir2`, preferably unifying the code with the
  1558         # `hg cp --at-rev . dir1 dir2`, preferably unifying the code with the
  1557         # existing functions below.
  1559         # existing functions below.
  1558         if len(copylist) != 1:
  1560         if len(copylist) != 1:
  1559             raise error.Abort(_(b'--at-rev requires a single source'))
  1561             raise error.Abort(_(b'--at-rev requires a single source'))