mercurial/cmdutil.py
changeset 47127 5ffc6c18fb96
parent 47072 4c041c71ec01
child 47128 bea4717415c0
equal deleted inserted replaced
47126:ecfe0819ada5 47127:5ffc6c18fb96
  1849         srcs = walkpat(pat)
  1849         srcs = walkpat(pat)
  1850         if not srcs:
  1850         if not srcs:
  1851             continue
  1851             continue
  1852         copylist.append((tfn(pat, dest, srcs), srcs))
  1852         copylist.append((tfn(pat, dest, srcs), srcs))
  1853     if not copylist:
  1853     if not copylist:
  1854         raise error.InputError(_(b'no files to copy'))
  1854         hint = None
       
  1855         if rename:
       
  1856             hint = _(b'maybe you meant to use --after --at-rev=.')
       
  1857         raise error.InputError(_(b'no files to copy'), hint=hint)
  1855 
  1858 
  1856     errors = 0
  1859     errors = 0
  1857     for targetpath, srcs in copylist:
  1860     for targetpath, srcs in copylist:
  1858         for abssrc, relsrc, exact in srcs:
  1861         for abssrc, relsrc, exact in srcs:
  1859             if copyfile(abssrc, relsrc, targetpath(abssrc), exact):
  1862             if copyfile(abssrc, relsrc, targetpath(abssrc), exact):